Chapter 8. Animation and Movement

The name of this chapter could mean a lot of different things, but it’s primarily concerned with understanding what an animation is and how it behaves, and applying that knowledge to the Unity animation system. Almost anything can be animated in Unity.

Tip

We strongly recommend that, for a more complete understanding of movement and animation, and how they relate to graphics in Unity, you read this chapter in concert with Chapter 5, Chapter 6, and Chapter 7.

Unity has an incredibly powerful animation system that’s overkill for a lot of simple games, but because it’s so powerful, flexible, and pervasive within Unity, it’s very easy to animate all sorts of things. The animation system can animate everything from objects to parameters to characters, and anything in between. It even supports animations that were created outside Unity!

Note

Some pieces of Unity documentation might refer to the Unity animation system as “Mecanim.” This is its old name, and is no longer used. But “Mecanim” and the “Unity animation system” are effectively interchangeable terms.

The workflow for animating in Unity revolves around animation clips, which describe the position, rotation, and other properties of an object over time.

Tip

Each animation clip is effectively a recording of the different parameters you’d like each property being animated to be, over time.

8.1 Animating an Object

Problem

You want to create an animator controller that manages a single animation. ...

Get Unity Game Development Cookbook 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.