Game Development Reference
In-Depth Information
Objective complete - mini debriefing
Basically, what we have done here is set up the animator controller for our robot character,
which is similar to the way we set up our character in
Project 4
,
Add Character Control
and Animation to Our Hero/Heroine
. However, in this project, we've used the
Blend Tree
settings to set up the
walk
and
run
animations.
In
Blend Tree
, we can add as many animations as we want. The animation will change the
state depending on the parameter we set up. In our case, we used
Speed
as our
Parameter
and set up
2
as the minimum value for the
walk
animation and
5
as the maximum for the
run
animation. We use the minimum value of
2
because we want our robot to change the
animation state from
idle
to
walk
at the
Speed
value of
2
, which will be created in the next
step. Also, the value
5
is the maximum speed for our character to run. The settings for
Speed
are shown in the following screenshot:
We also added a new substate machine for our
Shooting
animation. This substate machine
contains two animations, which are the
aiming
and
shoot
clips. The substate machine is
used to identify the separate stages that consist of a number of states. In our case, we used
this because we knew that the
shoot
state only connects to the
aiming
state, as we can see
in the following screenshot: