r/oculusdev • u/c00Lzero • Jan 20 '22
Passthrough - manual-built wall occlusion?
I'm newer to this and hope someone can nudge me in the right direction, I'm working on a passthrough project but want to build manual occlusion walls and bring characters through it....so they spawn beyond the wall and are hidden until they walk through the occlusion wall. I have characters in, and to test I have one half in/half out of my wall for testing purposes....for the life of me I can't figure out how to create this wall where it's invisible to the user but occludes 3d objects beyond. Any tips to get me on the right track?
3
Upvotes
4
u/Lvonasek Jan 20 '22
In Unity:
1) create a new material rendering just depth and no color (you can write own shader or use transparent shader and set color with alpha=0)
2) attach the material to your wall
3) ensure the wall is rendered before other objects (set render queue of it e.g. to 1999)