Руководство по графу анимаций/Переходная последовательность с соединениями
Материал из CryWiki Russia
Transition sequencing with links
This tutorial will demonstrate how to use links in order 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 later testing.
- 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
- 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' is unchecked because this is just an in-between or transition state, not selectable as a target*. Use the 'MovementToIdle'* template.
- Link between them as follows
Use Shift+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 goes to 'FooSitting' first before it finally plays 'FooSit'*.
- Test the sequence using the 'ag_debug' console command
- Load a level with the character which is associated with our 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 'FooWalk' or 'FooRun' state. Input 'ag_stance test_sit'* to set the target state to 'FooSit' and see the transition animation of 'FooSitting' is played.