SortingGroup
Draws the sprites, shapes, lines, trails, sprite shapes, polygons, meshes and words under this node as one unit at one layer and depth, so nothing slips between the members of a stack. Tiles and particles still sort for themselves.
On this page
Add it
+ Add node → Sorting Group creates a node with it already on. Already have a node for it? Add component → SortingGroupComponent.
From a script
A script on the same node writes these fields by name. SortingGroupComponent is the name to pass.
rgs
set_number("SortingGroupComponent", "depth", 0.0);
set_flag("SortingGroupComponent", "enabled", true); Fields
| Field | Script name | Kind | Default | What it does |
|---|---|---|---|---|
| Sort Layer | layer | number | 0 | Where the whole group sorts against the room; lower draws first. |
| Depth | depth | number, step 0.1 | 0 | Place within the layer; higher draws later. |
| Enabled | enabled | checkbox | on | Whether the group is grouping right now. |