From the course: Advanced Unity 2D: Platformer Player Movement

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Connecting player animation states

Connecting player animation states - Unity Tutorial

From the course: Advanced Unity 2D: Platformer Player Movement

Start my 1-month free trial

Connecting player animation states

- Now that we have our player manager, we simply need to connect up the animator states in order to switch animations. Let's select our Player game object, go to the Animator. Here you'll see we still have the states that we set up originally. In the past, I would connect one state to another state, and this way have them couple to each other. But in this case we're gonna wind up having a lot more complicated states throughout this game. So we're gonna take advantage of the AnyState, and connect all of our individual animation states to that. To help illustrate that, let's move AnyState into the middle, put our PlayerNormalIdleAnimation to the left, and our NormalWalk to the right, and let's connect the AnyState by right-clicking, making a transition, and pointing it to Idle, and do the same for Walk. Now before we move forward, we're gonna need a parameter in order to keep track of the state value. Here in Unity 5, the Parameters tab has been moved next to the Layers tab, we can…

Contents