Light2D not working with tilemap

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ItzPIGster

not sure what is entirely going on but could someone help me fix the black showing up on my screen when I get close to my wall?

:bust_in_silhouette: Reply From: natw2000F2

From my experience this occurs when the centre of your player’s Light2D node goes through your occluder tile.

This is caused by the centre of the player’s Light2D not being within the player’s collider shape. In your case it appears to be slightly above the player. This means the light source goes through top walls before the player stops.

To fix this, have you made sure that your player scene has the centre of its Light2D object inside the player’s collider?