Making characters sit in a chair - animation snaps forward

Hey,

For the past few days, I’ve been trying to get my characters to sit in a chair correctly. I’ve got it down for the most part, but I’m not quite there yet. See the clip at the following link:

In the animation import settings, I set the Root Motion Node to , and that definitely makes the sitting animation look good (not setting this results in the character sliding around a bit). However, after the animation, the character suddenly moves forward. I feel like I’m missing a small but crucial part…! I noticed that the capsule collider and navmeshagent stay in the same place. The transform also does not seem to change while the animation plays, but the transform arrows do seem to follow. Hmm.

Does anyone know what I should do to get this working correctly?

Thanks in advance,
Sem

My FBX import character shifts sideways too but at beginning.
A lot of devs are experiencing this anomaly so you are not a not alone and good luck trying to fix this.
Unity has loose variables problem in its animrig system and I dont think its been fully tested.
One can alter transforms in the animator and the GO responds in the scene. But if one moves the GO in the scene the animator does not reflect. And this could be the missing link.

I found it. Things are positioned correctly in the scene. You run a clip and the model jumps.
Click preview and copy a transform value. Unclick preview and paste the value in where you copied it. Toggle ‘preview’ and the model stays static. At least that is what I just tried and it correction that transform.

this happens because of the difference between the animator.rootpositions of the two clips (sitting down - sitting)

unity calculates rootposition from the hip* to the ground (of the animation). so you can see when sitting down the center is at feet, then when sitting is played, the center is at the hip.

*or more precisely center of mass

Root Transform is a projection on the Y plane of the Body Transform and is computed at runtime.
The Body Transform is the mass center of the character.

what you can do: if your sitting animation is originally centered at feet, setting Root Transform Position (XZ) to Original probably would make the character not move forward when playing sitting animation.

1 Like

Hey, thanks a lot for the answers!

This sounds promising - and logical, indeed. Only, how would I center the sitting animation around the feet? I know about baking the animation with Y, XZ, rotation, etc. But I haven’t found any option to change the animation center…

edit: I think I misread - you probably meant I could do this if the sitting animation was centered around the feet. Sadly, I don’t think it is… Is there anything else I could do?

tests w mixamo anims
XZ center position [sitting]:

  1. at feet
  2. between hip and feet
  3. at hip

somewhat baffling that not much difference in the look, but the difference is where the rootXZ ends
7120291--850093--sit1.gif 7120291--850096--sit2.gif 7120291--850099--sit3.gif
7120291--850102--usitting.jpg

I’m sorry, I seem to be unable to find where to change this option. I’m indeed also using mixamo animations. My import settings for my stand to sit animation are here:

Or am I looking in the wrong place? If I set the Root Motion Node to instead of , I can bake some positions in the animation, but I cannot do something with feet on the xz position (only on the y position), so I don’t think you mean that.

As for this, I can find the preview (you mean the small window showing the currently selected animation, right?), but I do not see any transform value there…

Or am I again looking in the wrong place?

Thanks again!

…Bump? Still haven’t been able to figure it out :frowning: