Skip to content

Components

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

FieldScript nameKindDefaultWhat it does
Scalescaletwo numbers (x, y)(1, 0)How much of the drift to apply, per axis.
EnabledenabledcheckboxonWhether it applies right now.