- Home /
Make mecanim not affect transform?
How can I make mecanim not affect transform position or rotation of the object? All my movement is handled through script and I don't want things like walk or run to affect the transform. I just want to play the animation with transform staying in place.
If I have a character at 0,0,0 and play a dance animation for example his transform will move off the starting position. This is totally not what I want, especially with animations that move character a tiny bit like 0.1 every time that stacks up with time.
The only way I know of right now is to reset position back through script but it would be nice if mecanim didn't do this at all.
This is especially annoying when character is a child of some other gameobject, causing child to drift off while parent stays where he was. I could use legacy animation but that defeats the purpose of all the other cool features mecanim offers.
Answer by horsman · Aug 12, 2013 at 05:54 PM
You just uncheck the "Use Root Motion" flag in the Animator.
I am having the same issue in 5.2, and checking or un-checking 'Apply Root $$anonymous$$otion' has no effect on this whatsoever.
Answer by AcDum · Dec 14, 2015 at 10:05 AM
i had the same issue and somehow this works for me.. Unity is just adding Rotation and Position in animations by itself(I can't figure out why). So go to animation windows and and delete those two animations' keyframes (position and rotation) for each of your buggy animations.