KIT207Tut2


Brief Gif showing the walking animation of a imported model cycling through its walking animation. The bool that triggers this walking animation is coded this;

        if (Input.GetKeyDown(KeyCode.W))

        {
            animator.SetBool("Walk", true);            

            if (Input.GetKeyUp(KeyCode.W))

            {
                animator.SetBool("Walk", false);
            }

        }

This is to reduce calls to the false bool as initailly i didnt have it set within the if loop.

Something else i discovered was to set the "Has exit Time" as false so that if you stopped walking like i do at the end of the gif above the animation will stop without with the movement of the player. I found this out after capturing the gif and feel it is better documented if the current gif version.

Leave a comment

Log in with itch.io to leave a comment.