Game Development Reference
In-Depth Information
Here are some of the animation parameters:
State Name : This specifies the name of the animation clip; this is what we'll
use in the animate node in the behavior tree when calling animations.
Animation Clip : This specifies the legacy animation clip associated with this
state.
Fade in Time , Fade Out Time : This specifies the amount of time required to
fade in and out of the animation. This can be useful to create smooth trans-
itions between animation clips.
Wrap Mode : This provides the wrap mode for the animation. This can be left
to default to use the clip's default settings. Other options are to loop or to play
the animation once and go to the beginning or end of the clip.
Using the animate node
Now we need to configure the behavior tree to play the animations. As our first step,
let's get Penelope running. Right-click on the root node in the WalkPenelope beha-
vior tree and go to Switch To Parallel and then rename the node to parallel . By
being parallel, we can add an animate node and have it update the animation at the
same time as the patrol node is being executed. So add an animate node, rename it
to animate run , and set Animation State to run . Your setting should look like the
following screenshot:
If you run the demo now, you'll see the Penelope character perform the animation
while it's moving. But the timing seems a little off. Change the moving speed of the
Search WWH ::




Custom Search