Answered

Animation is offset from Root Transform

Anonymous 3 weeks ago updated 3 weeks ago 2

When I export an animation and preview it, it plays several metres away from the GameObject/Root Transform. I believe it was because I moved the model to a different position when starting to animate because I wanted using the world geometry as a reference. I also rotated it 180 degrees and this is also affected the same way.


I assumed everything would be relative to the root bone and/or the first key frame but this doesn't seem to be the case. I assume then that I've moved the model away from its "origin" or configuration pose or something like that. Is there a way of resetting the animation back to the original position?

UMotion Version:
Unity Version:

Answer

Answer
Answered

Hi,
thank you very much for your support request.

When you want to have your character in a different place for animating, move it while it's not assigned to UMotion's Pose Editor. Once in place, assign it to the Pose Editor again. UMotion always uses the current scene position as the "zero" position.

If you move the character's position on the first frame (in UMotion), this is also contributing to the root motion because that's desired in some cases. For humanoid you can use the Inspector of the exported *.anim file to decide whether this starting offset should be applied or not (when you let Unity generate the root motion curves). See "Based Upon" setting:

In order to get rid of the starting offset in UMotion, the easiest way would be to use the curves view of the hips transform. Select all keys of the x curve and move it until the first key is 0. Then select only the first key and right click --> Edit Key to make the first key perfectly 0. Do the same procedure for the z curve.

For fixing the rotation, one way would be to use an additive animation layer and apply a rotation of -180°. You could also convert the rotation to euler interpolation (might introduce gimbal lock!) and change it via the curves view again, or you could simply delete the rotation keys and create them from scratch.

Please let me know in case you have any follow-up questions.

Best regards,
Peter

Answer
Answered

Hi,
thank you very much for your support request.

When you want to have your character in a different place for animating, move it while it's not assigned to UMotion's Pose Editor. Once in place, assign it to the Pose Editor again. UMotion always uses the current scene position as the "zero" position.

If you move the character's position on the first frame (in UMotion), this is also contributing to the root motion because that's desired in some cases. For humanoid you can use the Inspector of the exported *.anim file to decide whether this starting offset should be applied or not (when you let Unity generate the root motion curves). See "Based Upon" setting:

In order to get rid of the starting offset in UMotion, the easiest way would be to use the curves view of the hips transform. Select all keys of the x curve and move it until the first key is 0. Then select only the first key and right click --> Edit Key to make the first key perfectly 0. Do the same procedure for the z curve.

For fixing the rotation, one way would be to use an additive animation layer and apply a rotation of -180°. You could also convert the rotation to euler interpolation (might introduce gimbal lock!) and change it via the curves view again, or you could simply delete the rotation keys and create them from scratch.

Please let me know in case you have any follow-up questions.

Best regards,
Peter

Interesting, this really clears up a few things, thank you.