- Home /
Mecanim animation make the model slide slowly!
I have the Character Controller with inside a "graphic" model object (the character). The character have two simple "idle" and "run" animation with an animation controller.
The problem is that also if i'm always in "idle" animation (in the character object) the X and Z position change slowly making the model go out the parent!
In 3D Studio Max the origin of the model is always the same from start to the end of animation! So why is the character sliding and going out from the parent? If I disable all the animations the object don't slide...!
Why?
Answer by Baste · Feb 13, 2015 at 09:37 AM
You probably have root motion enabled in your animator. Select your animator object, and uncheck "apply root motion".
Root motion is simply the animation on the root of the object. If you turn that off, your animator won't be allowed to move the base object, which should fix the problem.
Alternatively, try the baking options in the Animation import.
There's one small option (in Unity 2020 and so on) that can produce this kind of undesired effect: Anim. Compression
In the Animation Tab of the file that contains the animations, setting the Anim. Compression to either Keyframe Reduction or Optimal can result in deviations of the root on any axis. If this is happening, the 2 possibilities are to either set Anim. Compression to Off or, in either Keyframe Reduction or Optimal, set the Position Error to a number small enough to remove the problem.
In my case, the sweet sport for the error to not occur is between 0.1 and 0.05 for the Position Error.
This problem can occur regardless of the Root Transform Position Y and XZ checkboxes.
Your answer
Follow this Question
Related Questions
Is it possible to use a random spawn position as a keyframe in an animation? 0 Answers
How do I make mecanim animations respect bone location/position keyframes? 0 Answers
Keep position/transform of object after animation 0 Answers
Misplaced Character with Mecanim 1 Answer
position change due to animation 1 Answer