Follow The Player- Game Dev Series 101

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.

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Data Engineering — Part 1 — Implementation of Data Lake using AWS Glue

The Paradox of Growth

How To Create Nested Schemas in Python Using the Google BigQuery API

A curled up green python.

The History of Unix

CS371p Spring 2022 Week #13: Sumedh Kandadai

Things I learned about objects in Python 3

Paula’s Choice cloning (Team: Paula’s Choice)

Story of Apache Spark

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
S.J. Jason Liu

S.J. Jason Liu

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

More from Medium

Level Design in Unity Part 2: The Walls

How to Make the Camera Shake Using Impulse Listener Extensions in Cinemachines Virtual Cameras

Loading Scenes In Unity

Camera plugin for Unity