AnimationNodeStateMachinePlayback

Inherits: Resource < Reference < Object

Playback control for AnimationNodeStateMachine.

Description

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

Example:

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

Tutorials

Properties

bool

resource_local_to_scene

true (overrides Resource)

Methods

float

get_current_length ( ) const

String

get_current_node ( ) const

float

get_current_play_position ( ) const

PoolStringArray

get_travel_path ( ) const

bool

is_playing ( ) const

void

start ( String node )

void

stop ( )

void

travel ( String to_node )

Method Descriptions

  • float get_current_length ( ) const

  • String get_current_node ( ) const

Returns the currently playing animation state.


  • float get_current_play_position ( ) const

Returns the playback position within the current animation state.


Returns the current travel path as computed internally by the A* algorithm.


  • bool is_playing ( ) const

Returns true if an animation is playing.


Starts playing the given animation.


  • void stop ( )

Stops the currently playing animation.


  • void travel ( String to_node )

Transitions from the current state to another one, following the shortest path.