- Home /
Character Controller Component, Gravity/inertia, and Root Motion
Working with the character controller component on a project, and for the most part I've been able to work around most of the issues with the component. There is one, however, that I've really been struggling with - the interactions with the component and root motion.
Typically , from what I understand, if you want to avoid the character controller applying gravity when using root motion, you need to set Root Transform Position (Y) to false for the individual animations. This is great - works fine for the most part, unless you transition directly from one of these animations to an animation with the option set to true. The object will then "fall" but will be falling at a much greater speed than if it just started falling. It's as if the object had been falling all along (without moving) and had been accelerating/building up momentum. The only workaround I've found for this is to also use Root Transform Position (XZ) of false on the animation - which is less than ideal.
I've been trying to figure out a way to manually reset this momentum and haven't really been able to come up with anything. I can't imagine this is intended behavior, but I also haven't been able to find really any information/bug reports on it.
Several questions around this:
Am I misusing the component here?
Should this be a reported bug (and ideally eventually fixed)?
Is there a way to reset this hidden momentum value?