Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

AnimationNodeStateMachinePlayback

Inherits: Resource < RefCounted < Object

Provides playback control for an AnimationNodeStateMachine.

Description

Allows control of AnimationTree state machines created with AnimationNodeStateMachine. Retrieve with $AnimationTree.get("parameters/playback").

Example:

var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")

Tutorials

Properties

bool

resource_local_to_scene

true (overrides Resource)

Methods

float

get_current_length ( ) const

StringName

get_current_node ( ) const

float

get_current_play_position ( ) const

StringName

get_fading_from_node ( ) const

StringName[]

get_travel_path ( ) const

bool

is_playing ( ) const

void

next ( )

void

start ( StringName node, bool reset=true )

void

stop ( )

void

travel ( StringName to_node, bool reset_on_teleport=true )


Method Descriptions

float get_current_length ( ) const

Returns the current state length.

Note: It is possible that any AnimationRootNode can be nodes as well as animations. This means that there can be multiple animations within a single state. Which animation length has priority depends on the nodes connected inside it. Also, if a transition does not reset, the remaining length at that point will be returned.