Unity Development — Camera Follow

Here’s a tip for Unity that is going to be quick and easy, but one of the most useful things you’ll see for all your future projects. We’re going to follow our player with a virtual camera.

To get access to virtual cameras, we’re going to need to download Cinemachine from the Package Manager. Open it up with from the Window tab and then find Cinemachine.

Once this is downloaded and installed, you can add a virtual camera to your scene.

This will automatically give your Main Camera a Cinemachine Brain, which takes care of most of the background work, making your Main Camera and the new virtual camera to be one and the same.

On the actual virtual Inspector, there is an attribute called ‘Follow.’ You are going to click and drag your player object into this spot and now the player will be followed. It is as simple as that.

You can play around with some of the other settings, such as dampening and dead zone, but for the most part, that is all there is to it. Your player will now be followed by the camera as they move.




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

Recommended from Medium

Understanding The Basics of Multiplatform Projects in Kotlin 1.3

Securely deploy a MySQL server on AWS

Spring Boot Introduction And Building A RESTful Application

Docker: definitions, example and Docker Compose

My idea on Test-driven development was completely changed

Azure Regions

Exception Handling and Telemetry with PostSharp, Application Insights, and Grafana

A step towards reinventing cyber security for the ‘new world’

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
Christopher Graf

Christopher Graf

More from Medium

2D Mobile Game: Tilemaps

The Ultimate Guide To Start Making 3D Video Games

Add a custom template to Unity for new projects

Pump The Brakes…