Rootmotion chracters floating off ground
Hello.
I've been struggling with this problem for several days now. Searching the forum, I see the question has been asked before but the few answers there are don't seem to be doing anything. Given that the topic keeps coming up, I hope that one of the Unity devs can shed some light on the issue.
Characters that move seem to float off the ground as they move. With some settings they rise up off the ground as they walk/run, in some cases the float up into space as they stand idle.
For the time being I'm using stock animations that came with unity - Idle, Walk, Run. I've also tried this with the stock 'Ethan' character as well as my own. The problem exists with either (although seems more so with my own character).
I've tried the following;
Bakeing animations to the Y on the Original, on the feet, and on the Centre of Mass.
I've tried with and without RidgidBody. When enabled the mass is set at 82kg (around 180lbs).
I've tried with Gravity on and Gravity off.
I've tried using Capsule Colliders (they usually just fall over flat on their face yet still animate).
I've tried using Box Colliders (with similar problems to Capsule).
I've tried with no collision system at all (although I will absolutely need one).
I've tried using the Normal Update loop and the Physics Update Loop (I need the physics one really).
I've tried characters that are scaled on import and those that are not scaled on import.
I've tried my own characters and rigs and the stock Ethan character and rig.
I've tried turning off root motion and processing the movement via script OnAnimationMove() and that lead to even more unfortunate yet hilliarous results (characters would lean backwards while moving, it looks like they were on an Olypmic Skeleton run).
I'm not sure if it makes a differance, but all characters are intsantiated at run time via;
//Create the copy of the player mesh
GameObject prefabMesh = GameObject.Find("PlayerPreFab");
//Instantiate a new copy of it
mPlayerMesh = (GameObject)GameObject.Instantiate(prefabMesh, new Vector3(), Quaternion.identity);
This really shouldn't make a difference but I include it for sake of completeness. There's no way to avoid doing this. I have to be able to create these characters at run time so maybe there's some setting I don't know about during the creation process?
The thing I have noticed is that it only seems to happen to characters that have moved from their original place. If a character only animates the Idle, and never moves, they stay in place. But as soon as they process any anymation that moves them, the problem occurs, even if they go back to the Idle state at some point.
Please see attached image.
I guess I'm doing something completely wrong, but I I can not get my characters to keep their feet on the ground.
Any help or suggestions would be appreciated. This is a blocking issue for me.
thanks David