Humanoid avatar is resetting position when transitioning between jump and idle animations

We have a model from Maya with some animations in it.

One of them is an idle animation.
I’ve attached an image along with its configuration inside the model ‘Animations’ tab.

Then, we have another animation where our character appears jumping up and forward, and as we are told, we should use the movement inside the animation, so we mark the checkboxes Bake into pose for the Y and for the XZ, as it is shown in the attached image.

In this case, the two animations come from two different imported models, but they are using the same rig, so we use the model and rig from the idle animation and add the jump animation clip motion using the Animator window.

If we trigger the jump animation in any place, the jump animations plays perfectly, jumping up and forward; but when it finishes, while it is transitioning back to the idle state, it resets its position to where the idle state was before playing the jump animation.

For example, if the character was in idle state at 0,0,0 and played the jump animation, the jump animation last frame would be at 0,10,10 but when transitioning back to the idle, it would go back to 0,0,0

The transition uses the Has exit time checkbox.

How could we manage to execute the jump animation, and then, transitioning to the idle state but making our character stay where the jump animation finished?

2262470--151390--IdleConfiguration.png
2262470--151391--JumpUpRightConfiguration.png

Hasn’t this happened to anybody?

Have you tried setting the idle’s Root Transform Position (XZ) Based Upon to Original?

1 Like

I’ve tried both possibilities (based upon original and based upon center of mass), but it does not work.
It keeps going back to where the idle position was (moves back and down).
Checking and unchecking bake into pose on the idle animation does not affect the result.
Perhaps is that, as the jump animation is baked into pose for both Y and XZ, it only affects the bones of the model and not the transform, so, when transitions back to the idle, it goes back to where the transform was originally.

I didn’t say but there is a script with OnAnimatorMove() implemented attached to the gameobject with the animator.

Does the jump animation (as built in Maya) affect the root bone’s transform? If not, then Mecanim won’t move the avatar forward, and you’ll get the behavior you described. Can you edit the animation in Maya to move the root bone too?

1 Like