Руководство по графу анимаций/Основы условного воспроизведения
Материал из CryWiki Russia
Основы условного воспроизведения анимации
Это руководство, поможет создать Animation Graph с одним state который воспроизведёт определённую анимацию после определённого сигнала. В руководстве опишется основной процесс использования 'Animation Graph'.
- Создайте вид с именем 'Tutorial0'
- Создайте state с именем 'FooAni'
- Create a node and name it
- Set general properties
- Set the parent state to 'Alive'.
- Check 'Allow selection', 'Include in game' and 'Can mix'.
- Set a template and its properties
A template is an xml file which specifies some essential parameters and exposes some configurable properties.
- The 'IdleOneShot' is a template for playing an animation once in an idle state.
To check details of a template, you can click on 'Show template xml file...'.
- Here we specify the 'animation' property to some animation of the character.
- Set up the input we need and the selection criteria of the state
- Set up the 'Signal' input
Here we'll use the 'Signal'* input.
- Add 'PlayFooAniOnce' to the 'Key Properties'.
- Set up the state's selection criteria
- You can see there are already some criteria inherited for the parent state.
- Now change the 'Signal' criterion from 'Use Parent State' to 'Specified Value'.
- As a value, set 'PlayFooAniOnce' which we added before.
- Check it with the 'State Query'
Click 'Compile and load graph'* . NOTE: You'd better specify at least 'Action', 'Health', 'Item', 'Signal' and 'Stance' criteria for the query to work correctly.
- Set the 'Signal' criterion to 'PlayFooAniOnce'.
Now click 'Perform search'. Our 'FooAni' state is in the result(the number after ':' means the match rank. If there are several matches, one of the higher rank is preferred).