How can I resolve this strange shadow issue?

Godot Version



In order to avoid “self-shadowing” of objects, I created double PointLight2D lights. One light with shadows on to cast the shadow and one with shadows off to light up the front face of the object.

This generally works fine, though it is overly complicated, except for the case where the player walks in front of the object. The shadow is still cast on the player’s sprite in front of the object. If I turn off the casting of shadows on the player, the player will no longer have shadows cast upon them when they travel behind the object, so this isn’t a viable solution.


Has anyone found a solution for this issue?