godotengine / godotengine/godot-docs
Occluder draw order docs only work in editor
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
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](https://docs.godotengine.org/en/stable/tutorials/2d/2d_lights_and_shadows.html#occluder-draw-order) 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
Contributor guide
No contributing guide indexed for this repository
Research direction
Open the 2D lights and shadows documentation at the “Occluder draw order” section and review its wording against the reported editor and game behavior. Clarify that the occluder is drawn for editor visualization, revise the explanation of what draw order controls, and correct “LightOccluder2Ds follows” to “LightOccluder2Ds follow.”
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot
- Domain
- documentation, game-dev
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100