Description
Your Godot version:
4.3.stable
Issue description:
I was trying to cast a light on a Sprite2D that had a LightOccluder2D attached, without actually occluding the sprite itself. In the documentation it is specified that
LightOccluder2Ds follows the usual 2D drawing order. This is important for 2D lighting, as this is how you control whether the occluder should occlude the sprite itself or not.
This led me to believe that this functionality would work both in the editor and in game.
When trying this out, in editor I got:
While testing the game I got:
After struggling to make this work (make it behave as it does with the clockwise occluder), I have convinced myself that this is actually the expected behavior (the occluder is only drawn in the editor, while in game, only the effect of the occluder is visible). Thus, the documentation is not necessarily wrong, but it could be updated to specify that this is the case only in the editor.
At least, the wording of
how you control whether the occluder should occlude the sprite itself or not
should be changed, as this section actually describes how you control if the occluder is drawn behind or in front of the sprite, not what the occluder occludes.
Also found a typo here while writing this. The correct form would be LightOccluder2Ds follow
instead of LightOccluder2Ds follows
.
URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/tutorials/2d/2d_lights_and_shadows.html#occluder-draw-order