Im currently implementing a Fog of War system in our dungeon crawler RPG.
The way I’ve done it is by setting up a grid of black tiles just above the floor. I would now love to have these tiles being drawn on top of my Orc enemies. I could just move them above the enemies, but with rotating camera angles etc, it looks like an actual roof instead of the intended blackness.
Now, heres my confusion: I have put in a second camera which renders only the Fog, and adjusted the cameras depth to be higher than everything else. This works for the fog and the orcs, but leads to issues with the fog being drawn on top of everything else, like walls - giving the impression that you can see the fog through walls. It also messes with my UI. So my question is, to simply have one group of gameObjects being drawn below another, do I have to set up a whole chain of cameras with different depths, starting at my UI, down to the walls, down to the fog, down to the enemies etc…?
That seems like a silly way of doing things. With the current setup, everything looks fine, except ors will be drawn above the fog (because spatially, they are actually standing on it!)
I realize my explanation of the setup might be lacking, please lemme know if this is rambling.
Is there a smarter way of doing this?