Search Unity

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-

    Spacewizard-

    Joined:
    Jun 7, 2019
    Posts:
    74
    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?