- Home /
Character keeps sinking into ground even though root motion is disabled
Hi!
I am quite new to Unity and I am having a (probably pretty simple) issue but I can't seem to figure it out.
I have a simple scene with a character that can walk, but with every step it sinks a tiny bit into the ground. It's barely noticeable at first, but after walking back and forth for a while it gets clearer.
Visual. Before vs after running around.
I have unchecked "Apply Root Motion" in the Animator Component, and also tried baking the Y position into pose in the animation import settings, but neither of these solutions seem to work. Also, the character does not have a rigid body or physics whatsoever yet.
It must have something to do with the animations as the issue doesn't occur when the animator is disabled.
Does anyone have any suggestions on how to fix this?
Thanks in advance! Lillian1810
EDIT: For some reason it now randomly switches between sinking down and floating up, so something really random must be going on....
Are you only using one animation (your run) or are you blending between several? make sure all of them have been baked properly. But the fact that it keeps sinking even after you've ticked off the apply root motion is weird...
Hi! Thanks for your reply! I have two animations, one for Idle and one for Run, and both are baked into pose.
I've even tried locking the Y axis in C# completely, which actually works in this particular situation, but is obviously not a very good fix :)
Answer by s7887177 · Aug 04, 2020 at 12:42 AM
Hi. Did you found the answer yet? I have the same problem here.... Appreciate if anyone got the answer.
Answer by Schlissel · Nov 27, 2020 at 09:43 AM
Select the Prefab of the animation that causes the legs to sink. Inspector > Animation > Root Transform Position (Y) > Bake Into Pose > V > Apply.
Your answer
Follow this Question
Related Questions
Only animate rotation not position 1 Answer
Scriptable root motion? 1 Answer
Trouble using root motion. 0 Answers
humanoid animation trigger root motions also on child on 2020 0 Answers