Creating the animations from the sprite sheet

As you can see from the sprite sheet, we don't need all the frames; however, we need the following animations:

  • Idle: When the character is not moving
  • Walk: When the character is moving
  • Jump Start: When the character starts to jump
  • Jump Air: When the character is still in mid-air
  • Jump Landing: When the character lands back

To create the preceding animations, we just need to drag the correct frames into the scene (ignore the size for now), and Unity will ask you where to save the single animations. Therefore, let's create a folder within our Character folder and call it Animations, in which we will save all the animations there.

For the single animations, here are the frames for each of them:

  • Idle animation: Select and drag from frame 53 to frame 58; name the animation Idle.
  • Walk animation: Select and drag from frame 0 to frame 10; name the animation Walk.
  • Jump Start animation: Select and drag from frame 44 to frame 48; name the animation Jump_Start.
  • Jump Landing animation: Select and drag from frame 48 to frame 52; name the animation Jump_Landing.
  • Jump Air: This is a bit more tricky. In fact, the animation is made of a single frame (frame 48), and if we drag it into the Scene view, Unity will just place a sprite, without creating any animation. Thus, open the Animation window by navigating to Window/Animation. Then use the drop-down menu to select Create New Clip, as shown in the following screenshot. Then, just drag the single frame (frame 48) into the Animation window, and the trick is done:
The image above is an example of the animation window within Unity.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset