Version: 2018.4
Animating a humanoid
Nesting Timeline instances

Using Animation Override tracks and Avatar Masking

This task 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 to, for example, run and carry an object. For information on creating an Avatar mask, see Avatar Mask window.

This task 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
on an Animation track bound to a humanoid:

This example uses a humanoid bound to a simple run cycle animation (RunForward) that loops once
This example uses a humanoid bound to a simple run cycle animation (RunForward) 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
. Because the Override track is linked to the Animation track above, the Override track is bound to the same GameObject, in this case, the DefaultMale humanoid.

To add an Override track, right-click the Animation track and select Add Override Track from the context menu
To 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 clip to match the Animation clip that you want to override.

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

Play the 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
. In this example, the WavingArms clip completely overrides the RunForward clip. To combine the lower-body animation from one Animation clip with upper-body animation from another Animation clip, specify an AvatarAn interface for retargeting animation from one rig to another. More info
See in Glossary
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, that masks the lower body animation, into the Avatar Mask property in the InspectorA Unity window that displays information about the currently selected GameObject, Asset or Project Settings, allowing you to inspect and edit the values. More info
See in Glossary
window. Enable the Apply Avatar Mask checkbox. An Avatar Mask icon appears beside the track name.

An Avatar Mask, that masks the lower body animation, is specified for the Animation Overview clip in the Inspector window. This allows the upper body animation to pass through.
An Avatar Mask, that masks the lower body animation, is specified for the Animation Overview clip in the Inspector window. This allows the upper body animation to pass through.
The Avatar Mask icon (red) indicates that the Animation Override track uses an Avatar Mask.
The Avatar Mask icon (red) indicates that the Animation Override track uses an Avatar Mask.

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. In this example, the DefaultMale humanoid uses upper-body animation from the WavingArms clip and lower-body animation from the RunForward clip. To temporarily disable the Avatar Mask, click the Avatar Mask icon.

The Avatar Mask icon (red) is gray when disabled. The WavingArms clip completely overrides the RunForward clip.
The Avatar Mask icon (red) is gray when disabled. The WavingArms clip completely overrides the RunForward clip.

  • 2019–08–20 Page published
Animating a humanoid
Nesting Timeline instances
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961