Animation Overrides and Avatar Masks
Now that we have some general knowledge of putting together character animations, let’s see what we can do with Animation Overrides and Avatar Masks.
I have a character here in an animation track. Click the three dots icon to show some options. Select Add Override Track.
Drop an animation into the override track. I use a punching animation to happen during the walk back animation. You can see in the video clip that while the punching animation does play, it jumps position from the walking back animation. Because this is in an override track rather than in-line with the other previous animations, you can’t use the option to align the clip with previous offsets.
You can however, use the Clip Transform Offsets of the animation clip to manually adjust the position and rotation.
I rotate the clip 90 degrees to match a turn right animation that occurs. The position is manually adjusted to look correct.
Now with the manual reposition and an ease in and out effect, the animation transition is looking much smoother.
Here is that clip again with a more cinematic shot.
Use the Create dialog to find and create an Avatar Mask. This will enable the user to tell the animation what areas of the body to animate, and which ones to ignore.
The inspector shows options for Humanoid and Transform with the Avatar Mask.
Here is the Humanoid option. Green areas are what will be animated, so here the entire body and position will animate.
I want the punching animation to happen while the legs continue using the walk back animation, so I turn off the legs and position in the Avatar Mask.
With the Override Track selected in Timeline, you can assign the new Avatar Mask in the inspector.
Just drag and drop!
Now you can see the arm still punch while the legs move backwards.
Let’s use a more obvious example. I will use the idle animation for the top half of the body, while the legs do a hip-hop dance animation.
The top half of the character is disabled in the Avatar Mask, leaving the legs and position active.
Now you can see the hero use the idle hands animation while hot stepping across the courtyard. That’s it and thanks for reading!