Game Development Reference
In-Depth Information
Figure 5-41. Comparison of walk animation (top) and run animation (bottom) at normalized points
You are going to add more movement for the zombie character by creating a blend tree for walking
forward, walking forward while turning right, and walking forward while turning left. In the Project
window select the ZombieLocomotion controller and open it in the Animator window. Create a new
float parameter named Direction in the same way you created the Speed parameter previously.
Select the Walk state, then right-click and select Create new BlendTree in State. Notice the Motion
property changed from Walk to Blend Tree in the Inspector. Now double-click the Walk state to
open the Blend Tree Graph with the root Blend Tree Node. Notice the Speed parameter with a slider
next to it appears on the node. First, change this parameter by selecting the Blend Tree Node and
changing Parameter in the Inspector panel from Speed to Direction, then click the minimum value
of 0 and change it to -1 (Figure 5-42 ). When using the Input Manager, by definition an axis has a
value from -1 to 1.
Figure 5-42. Walk Blend Tree in the Animator window and Inspector
 
Search WWH ::




Custom Search