Does Mecanim animations control character movement?

I’m a bit confused as to how Mecanim works. I was playing around with importing my character and using Unity’s animations. It seems that the motion capture animation drives the character controller. For example; I added a “Strafe Left” State, and when I added a strafe animation (Strafe_90HipsLeftFaceFwd) that had both left and right movement within the animation, it move the controller both left AND right, based on how it was motioned captured.

Is that how Mecanim works, uses the animation to control speed and direction? If I were to create my own animations, such as a walk cycle that’s standing in place, will my character not move nor play the animation? What about if I wanted different speeds of character; say a jog and a full out sprint, would I need to have two different animations for both, or can I use one generic “run” animation and tweak the speed of the controller and the speed of how quickly the animation loops to reflect the difference?

Thanks!

You can change the speed of the animation, yet the question is whether a jog animation really is the same as a run animation. You might get better results when splitting those two. Mecanim will really easily allow you to blend between those two based on the movement speed.

Apart from that, yes. Mecanim is generally designed to use an animation driven movement approach. However you may also lock the movement to stay in one place and instead have the “real” movement done by scripting.

So then if I use Mecanim, I should animate with the intention that the speed and direction in the animation will dictate the controller movement, correct?

Yes, as that will give the most realistic results. But you can do it both ways.