Search Unity

Question Problem with animations

Discussion in 'Animation' started by zZ_Serk7, Mar 17, 2021.

  1. zZ_Serk7

    zZ_Serk7

    Joined:
    May 15, 2020
    Posts:
    1


    Hi guys, I created a simple transition influenced by a parameter called isWalking, as you can see in the video, the real problem is that I can't get an animation change going from the "idle" state to "walk". I can get a change of animation only if i set "isWalking" as true before the runtime.

    I also coded the transition, setting "isWalking" as true when I press "w", the parameter sets to true, there is a change of state, from "idle" to "walk" but there is no change of animation

    //other scripts...
    void Update()
    {
    if(Input.GetKey("w"))
    {
    transform.Translate(speedPlayer * (Vector3.back * Time.deltaTime));
    animator.SetBool("isWalking", true);
    }
    //other scripts...
    }