Follow The Player- Game Dev Series 101
Quick guide: use Cinemachine to create a camera following Player.
In this quick tutorial, we will create a Cinemachine to follow the Player.
If your Unity version is 2019.04(as mine) or higher, you can install Cinemachine via Package Manager.
If you could not find Package Manager, you might need to install it from Asset Store.
Create Virtual Camera
Once installed Cinemachine, you can create a virtual camera from your drop down menu.
We will use this virtual camera as our default camera.
If you created a virtual camera, the origin main camera will no longer usable.
Select the virtual camera, there should have a column “Follow”. Drag your Player into that column. Now the camera would follow the Player.
If you want to adjust the distance of this camera, once you drag in Player to “follow” column, there should be a section called “Body” that would be able to adjust.
This is where you can make some changes to this virtual camera.
That is how to create a following camera.