Mecanim skips frames?


During gameplay Mecanim skips some frames.
To prove that I have prepared a sample scene where Ethan uses the HumanoidWalk animation.
The animation plays perfectly smooth in the animation preview window.
But in the gameplay it seems that some frames are skipped. This results in a choppy movement.

I have seen this mentioned on forums a few times but no official bug report exists.

It would be very nice if other people could test this and tell if everything works as expected or if they also get this sloppy animation (only during gameplay).
If everybody has this problem we could get Unity to acknowledge this problem.

The sample project can be downloaded here:

Thank you.

The problem is that you created two animation states with the same animation. Unity usually blends over from one animation to the other. Since you used the same animation that doesn’t work. Just delete your second state and the animation works fine since it loops automatically. As long as you want to “walk” you should stay in the walk state.

Alternatively you can remove the fading in the transition by selecting one of your two states and then click the transition in the inspector. You should see the fading curve below in the inspector with an overlap area. Keep in mind that you have two transition (one up one down). However such a setup is not recommended. Having two states for the same state makes no sense it just complicates the whole statemachine.