Point light in 2D. Wall boundaries.
Hello. I have an issue, maybe someone can give some advice?
I need to make light to not pass through walls.
I know, that light is in 3D space, and it affects on diffuse shader on sprite. But I believe there is way to do it.
I have tried 2D lights like:
2D Dynamic Lights and Shadows https://www.assetstore.unity3d.com/en/#!/content/25933
But I can't make this plugins work properly. They don't affect on diffuse shader, and I need absolute darkness when lights is off.
Any ideas? And thank's for help.
I once experimented with adding vertical walls on the edges that point towards the camera. As long as it was orthographic those walls were invisible (at least in my limited testing) but they would block the light properly. It's kind of hacky, but a potential solution.
Otherwise you might do some searching for roguelike visibility/shadows.
About walls - I did it, but it doesn't work. It seems that I missed something important here :)
On the picture I have 3D object Cube, and light still goes through it.