- Home /
character follows path but falls through floor at sit anim
I am using mecanim for this one. I have a character that has a rigid body and a capsule collider following a path. At the end of the path I turn the character in front of a chair then give him a sit animation. He sits but falls through the chair and floor collider. Not cool. Any thoughts?
Answer by felixpk · Jan 11, 2014 at 05:12 PM
Maybe the collider moves with the sit animation trough the floor and the chair. Try to adjust the vollider with curves. Else try to check bake into pose (y).
Thank you. I bet the collider is the problem. I will look into it. Found this and will see if I can employ it ... http://answers.unity3d.com/questions/505437/add-curves-to-anim-files-from-mixamo-animation-sto.html
Well it seems that that is not the problem. I believe that it has to do with my character following a path. When he sits he seem to be silding down towards the path, like he was continuing to follow it but now on his back.
So what I have, using $$anonymous$$ecanim, a character follows a path to a chair ... a trigger sets the next state which is a turn, then the immediate next state is sit.
Everything is cool until he sits. He falls through the chair and spins on the floor a little, like break dancing, not desirable in this case. I need him to just sit in the chair then I will give him a "sit idle" state. I am changing the size of the Capsule Collider on the character using Animation Curves but that does not seem to be helping.
Answer by diggerjohn · Jan 13, 2014 at 07:19 PM
Got it!!!! I had not selected "Root Transform Postition (Y)" and "Root Transform Postition (XZ)". Life is good again!!!!
I also found that the character, while sitting was slowly sliding out to the path he had just arrived from. So the final fix was disabling the follow script as soon as he arrived at the chair to turn and sit.