AnimationTree

Inherits: Node < Object

A node used for advanced animation transitions in an AnimationPlayer.

Description

A node used for advanced animation transitions in an AnimationPlayer.

Note: When linked with an AnimationPlayer, several properties and methods of the corresponding AnimationPlayer will not function as expected. Playback and transitions should be handled using only the AnimationTree and its constituent AnimationNode(s). The AnimationPlayer node should be used solely for adding, deleting, and editing animations.

Tutorials

Properties

bool

active

false

NodePath

advance_expression_base_node

NodePath(".")

NodePath

anim_player

NodePath("")

int

audio_max_polyphony

32

AnimationProcessCallback

process_callback

1

NodePath

root_motion_track

NodePath("")

AnimationNode

tree_root

Methods

Variant

_post_process_key_value ( Animation animation, int track, Variant value, Object object, int object_idx ) virtual const

void

advance ( float delta )

Vector3

get_root_motion_position ( ) const

Vector3

get_root_motion_position_accumulator ( ) const

Quaternion

get_root_motion_rotation ( ) const

Quaternion

get_root_motion_rotation_accumulator ( ) const

Vector3

get_root_motion_scale ( ) const

Vector3

get_root_motion_scale_accumulator ( ) const


Signals

animation_finished ( StringName anim_name )

Notifies when an animation finished playing.

Note: This signal is not emitted if an animation is looping or aborted. Also be aware of the possibility of unseen playback by sync and xfade.


animation_player_changed ( )

Emitted when the anim_player is changed.


animation_started ( StringName anim_name )

Notifies when an animation starts playing.

Note: This signal is not emitted if an animation is looping or playbacked from the middle. Also be aware of the possibility of unseen playback by sync and xfade.


Enumerations

enum AnimationProcessCallback:

AnimationProcessCallback ANIMATION_PROCESS_PHYSICS = 0

The animations will progress during physics frames (see Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS).

AnimationProcessCallback ANIMATION_PROCESS_IDLE = 1

The animations will progress during process frames (see Node.NOTIFICATION_INTERNAL_PROCESS).

AnimationProcessCallback ANIMATION_PROCESS_MANUAL = 2

The animations will only progress manually (see advance).


Property Descriptions

bool active = false

  • void set_active ( bool value )

  • bool is_active ( )

If true, the AnimationTree will be processing.


NodePath advance_expression_base_node = NodePath(".")

  • void set_advance_expression_base_node ( NodePath value )

  • NodePath get_advance_expression_base_node ( )

The path to the Node used to evaluate the AnimationNode Expression if one is not explicitly specified internally.


NodePath anim_player = NodePath("")

  • void set_animation_player (