Lesson 114 +10 XP

Humanoid Avatars and Retargeting

Humanoid Avatars and Retargeting

Unity's Humanoid animation system uses a standardized skeleton mapping called an Avatar to retarget animations between different characters.

Configuring the Humanoid Rig

To use animation retargeting:

  1. Select your imported character 3D model in the Project window.
  2. In the Inspector, navigate to the Rig tab.
  3. Set the Animation Type to Humanoid.
  4. Set Avatar Definition to Create From This Model (or copy from another model if identical).
  5. Click Apply, then click Configure to open the Avatar Mapping editor.

Avatar Mapping Editor

The mapping editor displays a stylized skeletal figure:

  • Green Bones: Correctly mapped joints.
  • Red Bones: Missing or incorrectly assigned joints (must be corrected manually).
  • The mapping requires a minimum of 15 body joints (hips, spine, limbs) to function.

Retargeting Animations

Once multiple character rigs are configured with valid Avatars, they can share the exact same animation clips and Animator Controllers:

// Character A and Character B can use the same runtime animator controller
// despite having entirely different bone structures and mesh shapes
animatorA.runtimeAnimatorController = sharedController;
animatorB.runtimeAnimatorController = sharedController;

TL;DR

  • Set Rig Animation Type to Humanoid to enable asset sharing.
  • Green indicators in the Avatar Editor verify successful mapping.
  • Standardized skeleton formats allow different models to use the same animations.