Using Animation State Machines
State Machines are a means of categorizing an animation, or sets of animations, into a state. A state can be thought of as a condition that the player character is in at a specific time. Is the player currently walking? Is the player jumping? In many third-person games such as The Last of Us, this involves separating the movement, jumping, crouching, and climbing animations into their own states. Each state is then accessible when certain conditions are met while the game is played. Conditions can include whether the player is jumping, the speed of the player character, and whether or not the player is in the crouched state. The job of the state machine is to transition between each state using logical decisions called Transition Rules. When you create multiple states with multiple Transition Rules that intertwine with one another, the state machine begins to look like a web. Please refer to the following screenshot to see what the state machine looks...