Game Development Reference
In-Depth Information
Let's create a very simple script to run the scarecrow with Mecanim. To communicate with the
Animator state machine, you will have to create a
parameter
inside the Animator first.
1.
In the lower left of the Animator view, click the + at the right of the
Parameters bar.
2.
Select Float for the type (Figure
6-33
).
Figure 6-33.
The Parameter types
3.
Name it
Input V
(Figure
6-34
).
Figure 6-34.
The new float parameter
4.
Select the transition from idle to walk, and set its Conditions to Input V
Greater than
0.1
(Figure
6-35
).