Transition Sequencing

This tutorial will demonstrate how to use links to specify the preferred sequence of an animation transition.

  • Create a new view for this tutorial.
  • Add 2 items ('test' and 'test_sit') to the Stance input for testing later.

  • Create 4 states of 'FooWalk', 'FooRun', 'FooSit', and 'FooSitting'.

  • The 'FooWalk' state is as follows:

  • Use the MovementDecoupled template.
  • Set the 'Stance' criterion to test.

The 'FooRun' state is as follows:

  • It's the same as 'FooWalk', except for the strings associated with 'animation' and 'ActualMoveSpeed'.

The 'FooSit' state is as follows:

  • Use the 'Idle' template.
  • Set the 'Stance' criterion to test_sit.
    • The 'FooSitting' state, which is a transition animation, is as follows:

  • The 'Allow selection' check box is deselected because this is just an in-between or transition state, not selectable as a target.
  • Use the MovementToIdle template.
  • Link between them, as follows:

  • Hold down the Shift key and click.
  • When the current state is 'FooWalk' or 'FooRun' and the new state target becomes 'FooSit' by inputs, it doesn't go directly to it, but first goes to 'FooSitting' before it finally plays 'FooSit'.
  • Test the sequence by using the 'ag_debug' console command.

  • Load a level with the character that is associated with the animation graph.
  • Enable AI in the viewport.

  • Select a debugging target by 'ag_debug entity_name'.
  • Input ag_stance test in the console to go to the 'FooWalk' or 'FooRun' state.
  • Input ag_stance test_sit to set the target state to 'FooSit' and to see the transition animation of 'FooSitting' being played.