AnimationNodeStateMachinePlayback¶
Inherits: Resource < RefCounted < Object
Playback control for 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")
var stateMachine = GetNode<AnimationTree>("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback;
stateMachine.Travel("some_state");
Tutorials¶
Properties¶
resource_local_to_scene |
|
Methods¶
get_current_length ( ) const |
|
get_current_node ( ) const |
|
get_current_play_position ( ) const |
|
get_travel_path ( ) const |
|
is_playing ( ) const |
|
void |
start ( StringName node ) |
void |
stop ( ) |
void |
travel ( StringName to_node ) |
Method Descriptions¶
float get_current_length ( ) const
StringName 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.
PackedStringArray get_travel_path ( ) const
Returns the current travel path as computed internally by the A* algorithm.
bool is_playing ( ) const
Returns true
if an animation is playing.
void start ( StringName node )
Starts playing the given animation.
void stop ( )
Stops the currently playing animation.
void travel ( StringName to_node )
Transitions from the current state to another one, following the shortest path.