Skip to main content

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:

  1. Purchase and download page Realistic Eye Movements
  2. Add LookTargetController and EyeAndHeadAnimator components to your InworldCharacters.
  3. 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

VariableDescription
Head Eye AssetThe JSON file name for loading head eye movements
Face DataThe scriptable object that stores morphed data
Morph Timehow long in seconds will the character do the emotion transitions

Properties

PropertyTypeDescription
AnimatorAnimatorGets or sets the animator this component is attached to
CharacterInworldCharacterGets or sets the character this component uses

API

FunctionReturn TypeDescriptionParameters
HandleMainStatusvoidHandle the main status of the character: Idle, Talking, Walking, etc.status: incoming status
HandleEmotionvoidPlays an animation according to the target emotionSpaffCode: An enum for emotion
HandleGesturevoidPlays the target gesture's animationsgesture: An enum for target gestures