Mecanim Position Deviation When play Animation

I set my animator controller as follows:10866-3ddffc09-38df-466b-9ebb-efd49c4933ae.png

and I config my animation of these state as follows:(in order to fix the position of model when play animation)
10867-67334d44-a4ac-4287-ab70-3ae2b3c0c429.png

After doing this ,it still has small position’s deviation when I played walk.

My model’s pos before playing is (0,0,0),but after playing,it become (-0.02934572, 0.003881995,0.08899949).

And the deviation will be larger when I played more times.

I think it should be (0,0,0) after playing for I fixed the transform position (x,y and z).

Is this a bug for mecanim system?

Any suggestion ?

Try setting Root Transform Rotation > Based Upon (at Start) → Original, and keep Base into Pose checked. If the animation starts out facing the wrong direction, adjust Offset.

Thank you very much! I tried your suggestion ,but the problem still exist.
Finally I write a code to fixed the position and it work well .
Your suggestion helped me solved another problem of me , nice answer~!

谢谢~!

2013/5/14

Actually ,I does’t really solved the problem . Last time ,I just changed the position of the gameObject into Vector3.zero when I play an animation.

But when the position deviation is large, the gameObject will not play the animation in situ. So It is really a problem for me.

I just want Mecanim fix the position of a gameObject , when the gameObject play an animation.
How can I do that?
Any Suggestion?

2013/5/30

@TonyLi

You are right !
Your method help me solved the problem!
Thank you very much! ^ ^

2013/5/31

I had this same problem, I could only solve it in script. applyRootMotion toggles whether the character will be moved during an animation.

Animator animator = this.GetComponent<Animator>();
animator.applyRootMotion = false;
//Set your parameters and play state, then when done:
animator.applyRootMotion = true;

Hope this helps!

Try switching off “Apply root motion” checkbox on your animator component that you are currently using on your gameobject.