I am making a top down game in 2D that uses unitys lights. I had a simple system of putting walls on a higher Z layer than the floor so they are not lit by a light, which works fine, but another floor is on the other side of the room, the light will light that room too.
I tried placing colliders, 3D cubes, Planes etc. under the wall tile but nothing seems to occlude or block the light from shining through it.
Is there any way to achieve this?
Here is the problem, you can see the light shining through the wall (well, technically under it)
Here is how the scene is structured in terms of Z layer
So here is an image showing how the walls are higher up on the Z plane, so they arent lit by the light, and my attempt at putting in a 3D cube to block the light, but it still passes through and lights up the sprite on the other side
I assume that this is either not possible, or I am doing something very stupid indeed!
The sprites are using the standard shader, and the light has been set to cast shadows and not cast them, makes no difference.
Anyone have any ideas on how to solve this?