Animating body parts for character movement events
In this recipe, we'll learn to animate the hat of the Unity bean-man character in response to a jump event.
For this recipe, we have prepared the files you need in folder
How to do it...
To animate body parts for character movement events, follow these steps:
- Create a new Unity 2D project.
- Import the provided package
BeanManAssets, by choosing menu: Assets | Import Package | Custom Package …, and then click the Import button to import all these assets into your Project panel.
- Increase the size of the Main Camera to
- Let's setup the 2D gravity setting for this project – we'll use the same setting as from Unity's 2D platform tutorial, a setting of Y=
-30. Set 2D gravity to this ...