Game Development Reference
In-Depth Information
Objective complete - mini debriefing
In this step, we have created the
Animator Controller
, which we used to control the anim-
ation state of our character. First, we named the layer to
Base
. Then, we dragged all the
animation clips and linked them with the transition. In the transition, we set up three para-
meters to give the condition for each changing state, which are
Speed
,
IsRun
, and
Mo-
tionState
.
The
Speed
parameter is a condition to check whether the character is moving, which uses
the
float
object.
IsRun
is a
boolean
object, which is used to check whether the player
hit the key to run (in this case, we will use the
Shift
key to toggle it in the next step). The
last parameter,
MotionState
, is the integer that is used to check which state the character is
in. In this case, we use
0 = Ground
,
1 = Jump
,
2 = Fall
, and
3 = Jump Hold
(this state will hold the jump animation to the last frame).
At last, we have put the
Animator Controller
to our character in the scene.