hello, I'm trying to make a game identical to Darkest fear, but I still can not establish well the mechanics of the shadows.
1- achieve that if you are not in a light source you receive damage.
2- take and release the lamp.
1- that the lights do not go through the walls.
2 - and that if you are right next to a corner, shadow will be generated with the angle of the corner.
I will leave a video example of how I would like it to be, it is something old but it shows what I want.
I also leave a link with what I have developed and photos of the events.
if someone can help me, it would be great.