Book Image

Building Levels in Unity

By : Volodymyr Gerasimov
Book Image

Building Levels in Unity

By: Volodymyr Gerasimov

Overview of this book

Table of Contents (17 chapters)
Building Levels in Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Dealing with Basic Animations
Index

Animation states


Double-click on the created CharacterController or navigate to Window | Animator in the top menu—it will take us to the Animator window where all the magic is happening.

The Mecanim animation system is based around the idea of separating character behavior into different states with assigned animation clips to play while in any particular state. The transitions between states are defined by the set of conditions and are controlled by the Parameters.

States

Right click on the empty space of the Animator window and navigate to Create State | Empty.

This created our first state, to which we can now assign an animation clip by:

  1. Selecting Create New State

  2. Renaming the state to Idle (in the Inspector)

  3. Assigning the Idle_Neutral_1 animation clip (Raw Mocap | Animations | Idle | Idle_Neutral_1) to the Motion parameter in the Inspector window

Done, if we just hit Play, we will see our character playing the Idle_Neutral_1 animation in the scene window.

Let's take a step back for a second...