Occluder
A shape that blocks light, casting a shadow away from every Light that reaches it. A box by default, with an optional outline so the shadow is not just a rectangle around the real shape.
On this page
Add it
+ Add node → Occluder creates a node with it already on. Already have a node for it? Add component → OccluderComponent.
From a script
A script on the same node writes these fields by name. OccluderComponent is the name to pass.
rgs
set_flag("OccluderComponent", "enabled", true);
set_point("OccluderComponent", "size", vec2(64.0, 64.0)); Fields
| Field | Script name | Kind | Default | What it does |
|---|---|---|---|---|
| Enabled | enabled | checkbox | on | Whether this blocks light. |
| Size | size | two numbers (x, y), at least 0 | (64, 64) | Size in world units, centred on the node. |
| Outline | points | list | empty | Shape that casts, in place of the box; three points or more. |