RootMotion
Turns a clip's own drift into the node's own movement: a dash whose art steps forward each frame carries the character forward instead of resetting the sprite in place. Scale is per axis, so sideways wobble need not become sideways travel.
On this page
Add it
+ Add node → Root Motion Character creates a node with it already on. Already have a node for it? Add component → RootMotionComponent.
From a script
A script on the same node writes these fields by name. RootMotionComponent is the name to pass.
rgs
set_point("RootMotionComponent", "scale", vec2(1.0, 0.0));
set_flag("RootMotionComponent", "enabled", true); Fields
| Field | Script name | Kind | Default | What it does |
|---|---|---|---|---|
| Scale | scale | two numbers (x, y) | (1, 0) | How much of the drift to apply, per axis. |
| Enabled | enabled | checkbox | on | Whether it applies right now. |