:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/AnimationNodeStateMachinePlayback.xml. .. _class_AnimationNodeStateMachinePlayback: AnimationNodeStateMachinePlayback ================================= **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` Playback control for :ref:`AnimationNodeStateMachine`. Description ----------- Allows control of :ref:`AnimationTree` state machines created with :ref:`AnimationNodeStateMachine`. Retrieve with ``$AnimationTree.get("parameters/playback")``. \ **Example:**\ :: var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state") Tutorials --------- - :doc:`../tutorials/animation/animation_tree` Properties ---------- +-------------------------+-------------------------+---------------------------------------------------------------------------------------+ | :ref:`bool` | resource_local_to_scene | ``true`` (overrides :ref:`Resource`) | +-------------------------+-------------------------+---------------------------------------------------------------------------------------+ Methods ------- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_current_length` **(** **)** |const| | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_current_node` **(** **)** |const| | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_current_play_position` **(** **)** |const| | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolStringArray` | :ref:`get_travel_path` **(** **)** |const| | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`start` **(** :ref:`String` node **)** | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`stop` **(** **)** | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`travel` **(** :ref:`String` to_node **)** | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- .. _class_AnimationNodeStateMachinePlayback_method_get_current_length: - :ref:`float` **get_current_length** **(** **)** |const| ---- .. _class_AnimationNodeStateMachinePlayback_method_get_current_node: - :ref:`String` **get_current_node** **(** **)** |const| Returns the currently playing animation state. ---- .. _class_AnimationNodeStateMachinePlayback_method_get_current_play_position: - :ref:`float` **get_current_play_position** **(** **)** |const| Returns the playback position within the current animation state. ---- .. _class_AnimationNodeStateMachinePlayback_method_get_travel_path: - :ref:`PoolStringArray` **get_travel_path** **(** **)** |const| Returns the current travel path as computed internally by the A\* algorithm. ---- .. _class_AnimationNodeStateMachinePlayback_method_is_playing: - :ref:`bool` **is_playing** **(** **)** |const| Returns ``true`` if an animation is playing. ---- .. _class_AnimationNodeStateMachinePlayback_method_start: - void **start** **(** :ref:`String` node **)** Starts playing the given animation. ---- .. _class_AnimationNodeStateMachinePlayback_method_stop: - void **stop** **(** **)** Stops the currently playing animation. ---- .. _class_AnimationNodeStateMachinePlayback_method_travel: - void **travel** **(** :ref:`String` to_node **)** Transitions from the current state to another one, following the shortest path. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`