Exercises

We added our transitions, but we need to adjust the weighting as well as add the animation parameters to these transitions. This way the character will react correctly as it blends back into and out of an animation.

1. The jump states will need the Jump condition added to them. Add this coming from both the idle and walk state transitions.

2. The walk state will need a condition coming from the idle state. Add the Speed condition with a Greater than 0.1 value.

3. Add the same Speed condition when coming out of a jump state and into a walk state. Also add an Exit Time condition with a .98 value; this will let us transition out of the jump animation before going into the walk one.

4. Add another Speed condition going out of the walk ...

Get Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.