Game Development Reference
In-Depth Information
Chapter 6
Mecanim and Animation
While some games have no characters whatsoever, a great number feature compelling characters
that drive both story and game play. A major part of their appeal and entertainment value comes
from their animation. Unity's Mecanim character-animation system is arguably one of the features
that pushes it seriously toward the realm of AAA title game development. In this chapter, you will
delve into some character set up and control, as well as traditional mechanical animation of
non-character objects.
The Story
To give you an idea where this odd collection of assets is leading, it's time to review the game's
little scenario. It's simple. You have a garden where you have a delicious selection of vegetables.
But you have a problem. The garden is being overrun by a horde of voracious zombie bunnies. As a
last resort, you've ordered a kit from the Internet that will turn a simple plaster garden gnome into a
potato-gun-wielding Garden Defender. Potatoes for ammunition are no problem, but the car battery
that runs your first line of defense has limited juice. The zombie bunnies multiply at will, so you must
make the best use of the “Gnomatic” device to eradicate them before the charge runs out on the
battery. The appearance of a psychedelic slug speeding through the garden heralds the chance of
extending the life of the battery.
Importing Animated Assets
You've already imported several static assets for your game and have a basic understanding of
scale factor, managing textures, and adding colliders. This time, however, you will also be defining
animation clips and preparing animated characters for use in your scene. Let's begin by importing
the new assets. As before, the safest way to ensure proper material generation is to bring the
textures in first.
1.
Open the Garden scene from the previous chapter.
2.
Save the scene as GardenSetUp .
243
 
Search WWH ::




Custom Search