Follow The Player- Game Dev Series 101

S.J. Jason Liu
2 min readAug 5, 2021

Quick guide: use Cinemachine to create a camera following Player.

We have been used Cinemachine to create some cutscenes before. And also use it to follow the Player in 2.5D Platformer game.
We can also use it to follow Player in 2D game.

In this quick tutorial, we will create a Cinemachine to follow the Player.

Install Cinemachine

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.

--

--

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.