class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCountedResourceAnimationNodeAnimationRootNode AnimationNodeStateMachine
A state machine with multiple AnimationRootNodes, used by AnimationTree.

Contains multiple AnimationRootNodes representing animation states, connected in a graph. State transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the AnimationTree node to control it programmatically.

var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state")
Enum StateMachineType<>():Enum

STATE_MACHINE_TYPE_ROOT = 0

Seeking to the beginning is treated as playing from the start state. Transition to the end state is treated as exiting the state machine.


STATE_MACHINE_TYPE_NESTED = 1

Seeking to the beginning is treated as seeking to the beginning of the animation in the current state. Transition to the end state, or the absence of transitions in each state, is treated as exiting the state machine.


STATE_MACHINE_TYPE_GROUPED = 2

This is a grouped state machine that can be controlled from a parent state machine. It does not work independently. There must be a state machine with state_machine_type of STATE_MACHINE_TYPE_ROOT or STATE_MACHINE_TYPE_NESTED in the parent or ancestor.

bool allow_transition_to_self<>():bool

If true, allows teleport to the self state with AnimationNodeStateMachinePlayback.travel(). When the reset option is enabled in AnimationNodeStateMachinePlayback.travel(), the animation is restarted. If false, nothing happens on the teleportation to the self state.

bool reset_ends<>():bool

If true, treat the cross-fade to the start and end nodes as a blend with the RESET animation.

In most cases, when additional cross-fades are performed in the parent AnimationNode of the state machine, setting this property to false and matching the cross-fade time of the parent AnimationNode and the state machine's start node and end node gives good results.

StateMachineType state_machine_type<>():StateMachineType

This property can define the process of transitions for different use cases. See also StateMachineType.

void add_node<>( =, :=, =, :=, ):void

Adds a new animation node to the graph. The position is used for display in the editor.

void add_transition<>( StringName from=, from:StringName=, StringName to=, to:StringName=, AnimationNodeStateMachineTransition transition=, transition:AnimationNodeStateMachineTransition=, ):void

Adds a transition between the given animation nodes.

Vector2 get_graph_offset<>():Vector2

Returns the draw offset of the graph. Used for display in the editor.

AnimationNode get_node<>( StringName name=, name:StringName=, ):AnimationNode

Returns the animation node with the given name.

StringName get_node_name<>( AnimationNode node=, node:AnimationNode=, ):StringName

Returns the given animation node's name.

Vector2 get_node_position<>( StringName name=, name:StringName=, ):Vector2

Returns the given animation node's coordinates. Used for display in the editor.

AnimationNodeStateMachineTransition get_transition<>( int idx=, idx:int=, ):AnimationNodeStateMachineTransition

Returns the given transition.

int get_transition_count<>():int

Returns the number of connections in the graph.

StringName get_transition_from<>( int idx=, idx:int=, ):StringName

Returns the given transition's start node.

StringName get_transition_to<>( int idx=, idx:int=, ):StringName

Returns the given transition's end node.

bool has_node<>( StringName name=, name:StringName=, ):bool

Returns true if the graph contains the given animation node.

bool has_transition<>( StringName from=, from:StringName=, StringName to=, to:StringName=, ):bool

Returns true if there is a transition between the given animation nodes.

void remove_node<>( StringName name=, name:StringName=, ):void

Deletes the given animation node from the graph.

void remove_transition<>( StringName from=, from:StringName=, StringName to=, to:StringName=, ):void

Deletes the transition between the two specified animation nodes.

void remove_transition_by_index<>( int idx=, idx:int=, ):void

Deletes the given transition by index.

void rename_node<>( StringName name=, name:StringName=, StringName new_name=, new_name:StringName=, ):void

Renames the given animation node.

void replace_node<>( StringName name=, name:StringName=, AnimationNode node=, node:AnimationNode=, ):void

Replaces the given animation node with a new animation node.

void set_graph_offset<>( Vector2 offset=, offset:Vector2=, ):void

Sets the draw offset of the graph. Used for display in the editor.

void set_node_position<>( StringName name=, name:StringName=, Vector2 position=, position:Vector2=, ):void

Sets the animation node's coordinates. Used for display in the editor.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...