Unity Animation System Part 2
Objective: Add a Walking Animation to the Player when they are Moving.
First I will open the Animator Window for Darren and drag in the Walking Animation from the Animations Folder. Then add the transitions from Idle to Walking and back.
Now I will add a parameter of type bool(True or False) and name it “Walk”. I will use this to trigger the Animation.
For the Transistion to walk I will add the Condition of Walk is True.
For the Transition to Idle I will add the Condition of Walk is False.
Now that I have the bool condition created and added to the transition, its time to set the bool condition using code. When the player is moving to the destination the bool is set to True and when the Player reaches their destination the bool is set to False.
Now lets see this code in action.