Using Cinemachine ClearShot to switch cameras to keep the player in shot
Cinemachine is a suite of tools that sets up a suite of cameras that improves player capture for dynamic view or improved cutscenes. This recipe implements Cinemachine ClearShot to switch between different virtual cameras to keep the player within shot.
We’ll do this by specifying that the center of the human character’s chest should be kept in the center of the shot as much as possible, and the AI system will decide which Camera to select to best meet these criteria:
Figure 13.29: Two virtual cameras the Cinemachine Brain can switch between for the best shot of the character
Getting ready
This recipe builds on the basic scene created in the first recipe of this chapter, so make a copy of it to work on for this recipe.
How to do it...
To use Cinemachine ClearShot to switch cameras to keep the player in the shot, simply perform the following steps:
- Open the...