[Solved] How to hide a portion of an object outside of a defined area

Hi all,

I would hide a portion of an object outside a defined area. The goal is to move the object in order to see the hidden portions.

In the images, you can see my 3D menu that I would like to show the portion only in the area identified by the green rectangular prism. This menu can move horizontally with an animation. That’s because of this animation that I want to hide my menu this way.

How can I do this? Do you know a better way?

Thank you


2154954--142313--Capture2.PNG

I found a solution: doing the inverse. Creating an objet that will hide part of my menu with DepthMask shader.

See here: http://wiki.unity3d.com/index.php?title=DepthMask