Legacy Documentation: Version 2018.2 (Go to current version)
Creating humanoid animation
Timeline Editor window
Other Versions

Using Animation Override Tracks and Avatar Masking

This workflow demonstrates how to use an Animation Override track and an Avatar MaskA specification for which body parts to include or exclude for an animation rig. Used in Animation Layers and in the importer. More info
See in Glossary
to replace the upper-body animation of an Animation track. Use this technique to animate a humanoid character to, for example, run and carry an object.

This workflow does not show how to create an Avatar mask. This workflow only demonstrates how to use an AvatarAn interface for retargeting animation from one rig to another. More info
See in Glossary
Mask when creating a Timeline instanceRefers to the link between a Timeline Asset and the GameObjects that the Timeline Asset animates in the scene. You create a Timeline instance by associating a Timeline Asset to a GameObject through a Playable Director component. The Timeline instance is scene-based. More info
See in Glossary
. This workflow also assumes that you have already created a Timeline instance with a simple Animation clipAnimation data that can be used for animated characters or simple animations. It is a simple “unit” piece of motion, such as (one specific instance of) “Idle”, “Walk” or “Run”. More info
See in Glossary
, such as a walk or run cycle, on an Animation track bound to a humanoid.

The Guard humanoid is bound to an Animation track with a run cycle (Run_Forward) that loops once
The Guard humanoid is bound to an Animation track with a run cycle (Run_Forward) that loops once

Right-click the Animation track and select Add Override Track from the context menu. An Animation Override track, named Override 0, is linked to the selected Animation track. Notice that the Animation Override track is not bound to a GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
. Since the Override track is linked to the Animation track above, the Override track is bound to the same GameObject: the Guard humanoid.

Add an Override track. Right-click the Animation track and select Add Override Track from the context menu.
Add an Override track. Right-click the Animation track and select Add Override Track from the context menu.

From your project, drag an animation clip with upper-body animation into the Override track. For example, drag an animation of a humanoid standing still and waving their arms. Position and resize the Waving_Arms clip as appropriate.

The Animation Override track contains an Animation clip of a humanoid standing still, waving their arms. The clip is resized to match the Animation clip (Run_Forward) of the parent Animation track.
The Animation Override track contains an Animation clip of a humanoid standing still, waving their arms. The clip is resized to match the Animation clip (Run_Forward) of the parent Animation track.

Play the TimelineGeneric term within Unity that refers to all features, windows, editors, and components related to creating, modifying, or reusing cut-scenes, cinematics, and game-play sequences. More info
See in Glossary
instance. The Waving_Arms clip completely overrides the Run_Forward clip. To combine the lower-body animation from the Run_Forward clip with the upper-body animation from the Waving_Arms clip, specify an Avatar Mask for the Animation Override track.

To specify an Avatar Mask, select the Override track to view its properties in the Inspector window
To specify an Avatar Mask, select the Override track to view its properties in the Inspector window

From the project, drag an Avatar Mask into the Avatar Mask property in the InspectorA Unity window that displays information about the currently selected GameObject, Asset or Project Settings, alowing you to inspect and edit the values. More info
See in Glossary
window. Activate the Apply Avatar Mask checkbox. An Avatar Mask icon appears beside the track name.

An Avatar Mask, that masks the upper-body animation, is specified for the Animation Overview clip in the Inspector window.
An Avatar Mask, that masks the upper-body animation, is specified for the Animation Overview clip in the Inspector window.
The Avatar Mask icon (red circle) indicates that the Animation track uses an Avatar Mask. Select and activate the Avatar Mask in the Inspector window.
The Avatar Mask icon (red circle) indicates that the Animation track uses an Avatar Mask. Select and activate the Avatar Mask in the Inspector window.

Play the Timeline instance. On the Guard humanoid, the upper-body animation is taken from the Waving_Arms clip and the lower-body animation is from the Run_Forward clip. To temporarily disable the Avatar Mask, click the Avatar Mask icon.

The Avatar Mask icon (red circle) disappears when disabled. The Waving_Arms animation completely overrides the Run_Forward animation.
The Avatar Mask icon (red circle) disappears when disabled. The Waving_Arms animation completely overrides the Run_Forward animation.

Did you find this page useful? Please give it a rating:

Creating humanoid animation
Timeline Editor window