Using Cinemachine ClearShot to switch cameras to keep the player in shot
A new feature of Unity is the Cinemachine
set of components:

Getting ready
This recipe adds to the scene created in the first recipe of this chapter, so make a copy of that project folder and do your work for this recipe with that copy.
How to do it...
To use Cinemachine ClearShot to switch cameras to keep the player in shot, just follow these steps:
- Open the scene provided, containing a 3D maze and
character-MsLazer.
- Un-child the Main Camera from
character-MsLazer,
since we need this camera free forCinemachine
to take control of it. - Install the
Cinemachine
package using the Unity Package Manager (to get the most up-to-date version).
- Add a Cinemachine ClearShot camera GameObject to the scene (menu: Cinemachine | Ceate ClearShot Camera). You should see a new GameObject in the Hierarchy named CM Clearshot 1. Set the position of this new GameObject to (0,0,0).
- CM Clearshot 1 should have a child GameObject, Cinemachine Virtual...