Setting Up a Basic Follow Camera with Cinemachine 3.x

Setting Up a Basic Follow Camera with Cinemachine 3.x

Cinemachine has been significantly upgraded in version 3.x, introducing new concepts, improved terminology, and a refined workflow. In this post, we’ll go through how to set up a simple follow camera using the latest version.

For more advanced examples, be sure to check out the sample scenes provided in the Cinemachine package—they’re very helpful for understanding the system.

Install the Cinemachine Package

Start by downloading and importing the Cinemachine package from the Unity Package Manager.

Install the Cinemachine Package

Check the Main Camera

After installation, you'll notice that the Main Camera now has a Cinemachine Brain component attached.

Cinemachine Brain

Make sure the Live Camera field shows the name of your Cinemachine Camera.

Live Camera

Create a Cinemachine Camera

In the Hierarchy window, right-click and go to Cinemachine > Cinemachine Camera to create a new virtual camera.

Create a Cinemachine Camera

Set the Tracking Target

In the Cinemachine Camera component, assign the object you want the camera to follow to the Follow field. You can drag and drop the object directly from the Hierarchy window.

Set the Tracking Target

Adjust Position and Rotation

To enable following behavior, set the Position Control mode to Follow.

Position Control

Next, set the Rotation Control mode to Hard Look At so the camera always faces the target.

Rotation Control

Tweak the Camera Movement

You can now fine-tune the camera's behavior with the following settings:

  • Position Damping : Creates a trailing effect, making the camera lag slightly behind the target for smoother motion.
  • Follow Offset : Adjusts the distance between the camera and the target.
  • Tweak the Camera Movement
  • Look At Offset : Offsets the point the camera looks at—useful if you don’t want the camera to focus on the target's center.
  • Look At Offset

That’s it! You now have a basic follow camera set up using Cinemachine 3.x. For more control and advanced features, exploring the official sample scenes is highly recommended.

Popular posts from this blog

Understanding Arrays as Reference Types in C#

How to Initialize Struct – C# Struct Initialization Guide