Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question How can i change a transform value from script which is overwritten by the animator

Discussion in 'Animation' started by Spacewizard-, Jun 20, 2022.

  1. Spacewizard-


    Jun 7, 2019
    I am making a 2d character pointing his gun at the mouse, the character is 2d but his movements are created by moving the transforms of his body parts.
    The problem here is that the upper body does not look at the mouse without disabling the animator component, the only state called "melee state" controls the upper body's rotation.
    So this rotation value is controlled in only one state, but the animator still controls that transform value even if the current state is not that state, I can do this like here
    but for a 2d character it may not be correct to do it this way.
    The question is: is there a way to cancel this transform value for a while from the animator's references, while only the character has a rifle in hand?