Action Points - performing an action in a specified spot
Action Points are a common concept used for characters in games that have to perform a certain action in a certain spot. You will find a lot of them in RPG games where NPCs populate towns and perform different actions creating an illusion of a living community. We are going to address a simple case of an Action Point in this recipe.
Getting ready
We are going to use a character with three animations: Walk
, Idle
, and Action
. We are also going to use the SetSpeedFromAgent.cs
script from the Using Blend Trees to blend walk and run animations recipe in Chapter 5, Character Movement. You can also open the provided example Unity project and go to the Chapter 05 Character actions and expressions\Recipe 05 Action points performing an action in a specified spot
directory. You will find an Example.scene
scene there. Play the game to see the effect—the Humanoid character will approach an Action Point and perform a pick up animation.