When playing a Third-Person Character, you might want her to aim her weapon at a target that is not directly in front of her, without making her change direction. In this case, you will need to apply what is called a Procedural Animation, which does not rely on pre-made animation clips, but rather on the processing of other data, such as player input, to animate the character. In this recipe, we will use this technique to rotate the character's spine by moving the mouse, allowing for adjustments in the character's aim. We will also use this opportunity to cast a ray from the character's weapon and display a crosshair over the nearest target. Please note that this approach will only work with cameras standing behind the third-person controlled characters:
![](https://static.packt-cdn.com/products/9781788471909/graphics/assets/7b4e1c26-5a69-4201-8fe2-9a08f21ccc56.png)