AnimationTree

    A node to be used for advanced animation transitions in an AnimationPlayer.

    A node to be used for advanced animation transitions in an AnimationPlayer.

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

    Tutorials

    Methods

    void

    advance ( delta )

    get_root_motion_transform ( ) const

    void

    ( String old_name, new_name )

    enum AnimationProcessMode:

    • ANIMATION_PROCESS_PHYSICS = 0 —- The animations will progress during the physics frame (i.e. ).

    • ANIMATION_PROCESS_IDLE = 1 —- The animations will progress during the idle frame (i.e. Node._process).

    • ANIMATION_PROCESS_MANUAL = 2 —- The animations will only progress manually (see ).

    Property Descriptions

    • active

    If true, the AnimationTree will be processing.


    Default

    NodePath(“”)

    Setter

    set_animation_player(value)

    Getter

    get_animation_player()

    The path to the AnimationPlayer used for animating.


    • process_mode

    The process mode of this . See AnimationProcessMode for available modes.


    • root_motion_track

    Default

    NodePath(“”)

    Setter

    set_root_motion_track(value)

    Getter

    get_root_motion_track()

    The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by ":". For example, "character/skeleton:ankle" or "character/mesh:transform/local".

    If the track has type Animation.TYPE_TRANSFORM, the transformation will be cancelled visually, and the animation will appear to stay in place. See also and RootMotionView.


    • tree_root

    The root animation node of this . See AnimationNode.

    • void advance ( float delta )

    Manually advance the animations by the specified time (in seconds).


    • get_root_motion_transform ( ) const

    Retrieve the motion of the root_motion_track as a that can be used elsewhere. If root_motion_track is not a path to a track of type , returns an identity transformation. See also root_motion_track and .


    • void rename_parameter ( String old_name, new_name )