Руководство по графу анимаций/Переходная последовательность с соединениями

Материал из CryWiki Russia

Версия от 15:37, 23 мая 2011; DCamer (Обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск
Эта страница страница помечена как находящиеся в процессе перевода.

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.
CryEngine AGT TransitionSequencing agtutor1 view inputs.png

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

CryEngine AGT TransitionSequencing agtutor1 states.png

  • The 'FooWalk' state is as follows

CryEngine AGT TransitionSequencing agtutor1 foowalk.png Use the 'MovementDecoupled'* template.

  • Set the 'Stance' criterion to 'test'.
  • The 'FooRun' state is as follows

CryEngine AGT TransitionSequencing agtutor1 foorun.png

  • Same as 'FooWalk' except for the strings associated with 'animation' and 'ActualMoveSpeed'
  • The 'FooSit' state is as follows

CryEngine AGT TransitionSequencing agtutor1 foosit.png

  • Use the 'Idle' template.

Set the 'Stance' criterion to 'test_sit'*.

  • The 'FooSitting' state which is a transition animation is as follows:

CryEngine AGT TransitionSequencing agtutor1 foositting.png 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

CryEngine AGT TransitionSequencing agtutor1 links.png 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

CryEngine AGT TransitionSequencing agtutor1 check result.png

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

CryEngine AGT TransitionSequencing agtutor1 ai on.png 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.