- Home /
How do I only show parts of objects that overlap [2D]
I'm working on a 2D Unity project where the player can only see objects in their field of view. I have successfully created a mesh that overlaps anything that would be in the player's field of view, but now I'm having trouble with only showing parts of objects that the mesh overlaps with.
Here is what I have so far (the gray area is the player's field of view which is a mesh:
Here is the type of thing that I'm looking for:
What can I do to get that desired effect? Shaders (I have no clue how to use shaders)? Colliders? Any ideas would be greatly appreciated. If there is any info you need that I didn't provide, comment and I add the necessary info. Thank you in advance!
Answer by blinkafrootable · Aug 13, 2018 at 09:00 PM
I got an answer over here: https://gamedev.stackexchange.com/questions/162755/unity-how-do-i-only-show-parts-of-objects-that-overlap-2d