Head Animation
This class is the basic class for displaying head animations. It currently supports looking at players, and display facial expressions for emotions.
If you want to use detailed head-eye movements, please do the following:
- Purchase and download page Realistic Eye Movements
- Add
LookTargetController
and EyeAndHeadAnimator
components to your InworldCharacters.
- Implement
SetupHeadMovement
by,
a. Calling Resources.Load<TextAsset>(m_HeadEyeAsset);
b. Calling EyeAndHeadAnimator::ImportFromJson()
, with the data of the TextAsset
that you loaded
Inspector Variables
Variable | Description |
---|
Head Eye Asset | The JSON file name for loading head eye movements |
Face Data | The scriptable object that stores morphed data |
Morph Time | how long in seconds will the character do the emotion transitions |
Properties
Property | Type | Description |
---|
Animator | Animator | Gets or sets the animator this component is attached to |
Character | InworldCharacter | Gets or sets the character this component uses |
API
Function | Return Type | Description | Parameters |
---|
HandleMainStatus | void | Handle the main status of the character: Idle , Talking , Walking , etc. | status: incoming status |
HandleEmotion | void | Plays an animation according to the target emotion | SpaffCode: An enum for emotion |
HandleGesture | void | Plays the target gesture's animations | gesture: An enum for target gestures |