Light2D.MODE_MASK. godot 4,2

I’m trying to make an amongus/darkwood style Line of Sight system. Like this tutorial: (Entities are only visible within light2D).

Problem is godot 4,2 doesnt have the Light2D.MODE_MASK.

There are some workarounds in the comments of the video, like assigning a CanvasItem Material to the Sprite2D and setting it’s light mode to “Light Only” and it kind of works, but now the big problem is that the further away the entity is from the light source, it gets more and more transparent.

Has anyone found a good way of implementing something similar in godot 4,2?

Found a fix it was the texture on the light i was using. If you use a large white square that isnt transparent it works fine.

1 Like