Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Previous state in animator affecting current state keyframes?

Discussion in 'Animation' started by jaine-wond, Oct 28, 2022.

  1. jaine-wond


    Nov 9, 2020
    I have two animations on an object (tested with a cube), where one doesn't have rotation in the y-axis keyframed. I would expect that when the second animation is playing, I can rotate the object around the y-axis. However, if the first animation is applied to the object in an animator before the second one, I can't rotate the object. If the second animation is the only animation, I can do the rotation.

    First animation keyframes:

    Second animation keyframes:

    Animator with both animations, with a boolean transition so that the second animation always becomes active, but the first animation is the default state, where the rotation in the y-axis doesn't work when playing:

    Animator with only the second animation, where the rotation works when playing:

    Attached also a minimal example project here, with Cube in the scene having the animator with both animations and Cube2 having the animator with the second animator.

    Any solutions on how I could also be able to rotate the object in the y-axis in the second situation? Why is the previous state affecting the object's animation keyframes?

    Attached Files: