- Home /
How to only render things behind a mesh.
Basically I have this "line of sight" mesh that adapts to the players location. Like this:
What i need is to only show/render objects that are behind this mesh. So for example you could only see another player if they are in "line of sight".
A better option would be to invert this mesh (i have no idea how to do) or to create a shader that does this effect all togeather.
Tl;DR I need a line of sight shader/script but have no knowledge on how to make shaders.
$$anonymous$$aybe you already have a way to know which objects are not in sight (collisions / raycasts ...), then set a special TAG for them and not render those in the camera (Culling$$anonymous$$ask).
If using a shader would be simpler, can't help am not a specialist in this field...
Your answer
Follow this Question
Related Questions
Several questions about OnRenderObject and Camera projection matrix use. 0 Answers
Glow effect - alpha channel ignored to some specific android device 0 Answers
Rendering only specific colors? Color filter? 1 Answer
rendering things in order 0 Answers
Rendering a specific pass (ie. camera.RenderPass("Custom")) 0 Answers