How to use masking to hide an object
You can give your eye cube a Boolean modifier. Create a second cube with a hole in it that is as big as your eye white area, make it invisible in the viewport and in render (Properties panel &gt; Viewport Display &gt; Dsiplay As &gt; Wire and disable the camera icon in the Outliner), give your eye cube a Boolean modifier, mode &gt; Difference, with the hole cube as Object. Now when you move your eyecube, the part that crosses the hole cube will be invisible: