How does Unity calculate animator's center of mass(animator.bodyPosition)?

As the Scripting API said, Animator.bodyPosition is:
The position of the body center of mass.
The position is in worldspace. You should only set this value from within an OnAnimatorIK() function call.

I have a character model with a Z-axis moving animation, when I tried to log bodyPosition, I meet some problems.

Here are the settings and the result:

There are some questions:

  1. When get in OnAnimatorMove(), the bodyPosition is not the same, and not in worldspace, why?
  2. The Animator.Root T curve is the animator.bodyPosition, and the Animator.Root Q curve is the animator.bodyRotation?
  3. Why the bodyPosition is not correct at first frame of the game?

So…does anyone knows what is the real magic inside the animator.bodyPosition?

AND how to calculate the root motion by center of mass and body orientation?

1 Like

I wish somebody had answered, because that’s my question too.

1 Like

Hello!Have you solved the problem?I have been puzzled by this question for a long time…