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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

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

Discussion in 'Animation' started by stalwart5033, Jun 20, 2022.

  1. stalwart5033


    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?