- Home /
Top Down game rendering field of view only
I need to NOT render everything that is not in the FOV of the player. I'm not trying to disable the gameobjects that are outside the FOV or anything, for example if there is a light I need the light to be visible even if the lights center is outside the FOV. So its more of a like a mask.
The red colored area is is the visible area, red border it is the full FOV. Everything outside the visible area should be invisble/blackend.
How can I achieve this? So far I've tried to this with Area and Spot light but the light's intensity falloff is a problem, If there's a way to get a constant light intensity this should work. So I guess the only way to achieve this is using scripting and shaders but I've no idea where to start.
This is the closest thing I could find but its not free so I've no way to study it(even if it was not I'm sure its so complicated I wont understand a thing). I just want to know the basic and simplest way to achieve this. https://assetstore.unity.com/packages/tools/particles-effects/gpu-line-of-sight-field-of-view-visualization-19764
Please help, thanks!