Hey folks,
I’m currently looking into how to do 2d Fog of War, Terraria style:
My initial implementation looks like this: I have tons of little planes scattered throughout the world. Since I only know how to use triggers if they have a Box Collider as well as a rigidbody assigned to them, that’s what I did. Now the code works like:
If SightTrigger enters, set materialColor to X. If sightTrigger exits, set it back to black.
Now, this works, but it’s not very efficient and just rapes the performance, since I literally have around 100 gameobjects just there, all with box collider and rigidbodies applied to them.
Is there a clever way of how to do this implementation without any heavy calculation?