I want to have 2D lighting that can be blocked by in-game objects. My game has a top-down view and all game objects are described by rectangles.
Let's say I have a 10x10 world and I place a light at 1x1 and walls all around that light. I want to be able to see the light source at 1x1, but not anywhere else, because it's blocked by the walls.
I've heard of casting light rays works, but how does that really work?
No comments:
Post a Comment