How Can We Help?

How do motion layers work?

Unity’s Animator Controllers support multiple layers… nothing to do with the MC. It’s just a feature Unity has. You can learn more here.

Animator Controller Layers allow animators to run multiple animations at the same time. For example, you can have a walking animation on the first layer and a waving animation on the second.

Typically, the second (and later) layers would have a mask that allows it to only animate a part of the body… say the upper body or arms.

This way, the second layer’s animation doesn’t totally override the first layer’s animation. In our example, the walk animation will control the legs and the waving animation will only run on the upper body. Now our character can walk and wave at the same time.

This is all standard Unity stuff.

 

Motion Layers

Motion Layers simply sync 1 to 1 to the Animator Controller Layers.

The first Motion Layer controls the flow of animations on the first Animator Controller Layer.

The second Motion Layer controls the flow of animations on the second Animator Controller Layer.

etc.

So, by putting a “Walk Run” motion on the first layer, the character will use the first Animator Controller Layer to have the character walk.

If we put an “Attack” motion on the second layer, the character will use the second Animator Controller Layer to have the character attack.

In this way, the character can walk and attack at the same time. If the first layer has the character Idle, than the character will “idle and attack” at the same time.

Overriding Layers

For some motions, we need to override the later layers. For example, you don’t want the second layer to run an attack animation while the character is dying (on the first layer).

So, motions have an “Override Layers” property. When checked, the motion forces motions on later layers to go to the “Empty” state… meaning don’t play.

Full Body Animations… Not Always Good

It’s worth noting that not all animations look good when masked onto a second layer. This has to do with how the animations were created.

For example, lets say you have a sword swinging animation where the character steps forward, twists a bit, swings the sword, and steps back. This looks great as a full body animation on the first layer.

However, when the swing is put on a second layer the mask prevents it from animating the feet, legs, hips, and lower spine. So, the swing no longer steps forward and twists. This means the aim of the swing can be off.

To make things worse, if the animation on the first layer is animating the legs and hips the swing may be even more off.

Sometimes you can manage this with IK to force the spine rotation, but that’s an animation-by-animation task.

Page Contents