AnimationNodeStateMachineTransition

Inherits: Resource < Reference < Object

There is currently no description for this class. Please help us by contributing one!

Tutorials

Properties

String

advance_condition

""

bool

auto_advance

false

bool

disabled

false

int

priority

1

SwitchMode

switch_mode

0

float

xfade_time

0.0


Signals

advance_condition_changed ( )

Emitted when advance_condition is changed.


Enumerations

enum SwitchMode:

SwitchMode SWITCH_MODE_IMMEDIATE = 0

Switch to the next state immediately. The current state will end and blend into the beginning of the new one.

SwitchMode SWITCH_MODE_SYNC = 1

Switch to the next state immediately, but will seek the new state to the playback position of the old state.

SwitchMode SWITCH_MODE_AT_END = 2

Wait for the current state playback to end, then switch to the beginning of the next state animation.


Property Descriptions

String advance_condition = ""

  • void set_advance_condition ( String value )

  • String get_advance_condition ( )

Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the AnimationTree that can be controlled from code (see Using AnimationTree). For example, if AnimationTree.tree_root is an AnimationNodeStateMachine and advance_condition is set to "idle":

$animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0)

bool auto_advance = false

  • void set_auto_advance ( bool value )

  • bool has_auto_advance ( )

Turn on the transition automatically when this state is reached. This works best with SWITCH_MODE_AT_END.


bool disabled = false

  • void set_disabled ( bool value )

  • bool is_disabled ( )

Don't use this transition during AnimationNodeStateMachinePlayback.travel or auto_advance.


int priority = 1

  • void set_priority ( int value )

  • int get_priority ( )

Lower priority transitions are preferred when travelling through the tree via AnimationNodeStateMachinePlayback.travel or auto_advance.


SwitchMode switch_mode = 0

The transition type.


float xfade_time = 0.0

  • void set_xfade_time ( float value )

  • float get_xfade_time ( )

The time to cross-fade between this state and the next.