- Home /
How can I hide a mesh renderer using another invisible mesh?
Hello , i am developing a mobile application and i need to hide a part of a mesh, specifically the one behind a transparent mesh.
Referring to the image i need that the part of the cube that is behind the sphere should not be visible BUT in the final scene the sphere will be transparent.
A typical example is how the Hololens occlude the virtual objects using the scanned mesh, that is still not visible but hide the objects behind.
Maybe i missed something that is really simple. I hope that the explanation is good enough. Thank you guys.
Answer by nullgamestudio · Mar 12, 2019 at 01:53 PM
There is a built-in way to achieve that using the shader VR/Occlusion.
I completely forgot about that, sorry. I feel very stupid . Hope this will be useful.
I create a material with the shader in VR/SpatialMapping/Occlusion and then added to my AR Face for face tracking using AR Foundation and it works!
But it doesn't works with normal meshes :(
Your answer
Follow this Question
Related Questions
Specific Rendering Per Player In Multiplayer 1 Answer
Standard shader's Fade rendering mode won't allow full opacity with a textured material 0 Answers
set gameobject in front of all others and don't have own faces appear in front of each other 1 Answer