A Camera to always look at and follow the Third Person Controller
Our project uses the Third Person Character Controller Starter Assets, and this package includes mouse-control functionality for the character’s direction, so in this recipe, we’ll create a Camera to move with and look at the third-person character by creating a Cinemachine Virtual Camera
that always follows our robot’s PlayerCameraRoot
GameObject.
It’s always good to give players choices and control over their gaming experience. In this recipe, we’ll set up a mouse-controllable Cinemachine FreeLook Camera and let the player switch to it.
Getting ready
This recipe builds on the basic scene created in the first recipe of this chapter. So, make a copy of that one to work on in this recipe.
How to do it...
To create a Camera that will always look at and follow the Third Person Controller, perform the following steps:
- Open the BasicScene scene.
- This...