Ignoring root rotation

Hi,

I’m using a humanoid animation controller that doesn’t use root motion (position/rotation are controlled via script). I’d like to use a pivot animation that has rotation built in, but I’m facing the following problem:

  1. Script rotate character 90 degrees
  2. Script triggers left turn animation in controller
  3. Between script driven rotation and the rotation in the animation, my character rotates 180 degrees
  4. After left turn animation completes and returns to idle, character appears to snap back 90 degrees

Is there a way I could cancel the rotation built into the animation? I’ve tried setting a root transform rotation offset in my import settings, but that just results in the initial rotation being off.

Thanks!

You can implement OnAnimatorMove; this will let you deal with root motion yourself. Then you can decide when you want to apply the root motion.

Or you can go in the animation importer, and enable Bake Into Pose for the root rotation. This will lock the rotation of the character, which should prevent it from turning.