Skip to content

Components

Area

A shape that notices other areas overlapping it, for triggers, pickups, hitboxes and hurtboxes. A script with an Area base hears them enter and leave.

On this page

Add it

+ Add node → Area, Audio Zone, Effector creates a node with it already on. Already have a node for it? Add component → AreaComponent.

From a script

A script on the same node writes these fields by name. AreaComponent is the name to pass.

rgs
set_text("AreaComponent", "track", "");

Fields

FieldScript nameKindDefaultWhat it does
Shapeshapesection—The shape this area covers. Always non-solid — a solid shape is a Collider instead.
FieldScript nameKindDefaultWhat it does
Kindkindone of Rectangle, Circle, CapsuleRectangleWhich shape.
Sizesizetwo numbers (x, y)(64, 64)Size in local units.
Polygon
OutlinepolygonsectionemptyPoints replace the box; empty leaves the box alone.
Steppolygon_stepnumber, at least 032 uHow long each collision box is where a slanted outline, or a solid circle or capsule, is cut into boxes: in the node's own units, or the world's on a turned node. Shorter follows the curve more closely and costs more boxes; zero cuts nothing, so a round solid is about its box again.
Offsetoffsettwo numbers (x, y)(0, 0)Offset from the node origin.
SolidsolidcheckboxoffWhether this blocks movement. Off, it stops nothing and notices nothing: an Area is what notices bodies.
One Wayone_waycheckboxoffOnly stops a body falling onto it from above.
Layerlayernumber1Which collision layers this is on: what the collision matrix, casts and queries go by.
Include Layersinclude_layersnumber0A body on one of these layers meets this whatever the collision matrix says. It is not put on them. Exclude Layers beats it.
Exclude Layersexclude_layersnumber0A body on one of these layers passes through this. It stays on its Layer. Beats Include Layers.
MaterialmaterialsectionnoneFriction and bounce; empty stops a body dead.
FieldScript nameKindDefaultWhat it does
Frictionfrictionnumber, at least 0, step 0.05none0 is ice, 1 is ordinary ground.
Bouncebouncenumber, 0 to 1, step 0.05none0 stops dead, 1 is elastic.
Layerlayernumber1Which layers this area is on.
Maskmasknumber1Which layers this area looks for.
TracktracktextemptyAnimation event track that enables this area; empty is always on.