Getting ready

We are going to use the same assets as in the previous recipe, but instead of using the CharacterLookAt.cs script, we will use additional animations: AimForward, AimForwardUp (aim 45 degrees up), AimForwardDown (45 degrees down), AimLeft (45 degrees left), AimLeftUp (45 degrees left and 45 degrees up), Aim LeftDown (45 degrees left and 45 degrees down), AimRight (45 degrees right), AimRightDown (45 degrees right and 45 degrees down), AimRightUp (45 degrees right and 45 degrees up). See the following screenshot for reference:

Nine directional aim animations

You can also use the provided example Unity project and go to the Chapter 06 Handling combatRecipe 09 Using blend trees to aim directory. You will find an Example.unity scene there, with a Humanoid character. Play the game to see the effect. You can find all the necessary animations in the Rigs directory.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.183.153