Setting Up Cinemachine in Unity

Jon Jenkins
3 min readJun 9, 2021

Cinemachine is a useful tool in Unity that allows you to compose cutscenes and set up other sophisticated camera logic with minimal overhead. Here I will demonstrate how to set it up in your project and some of the basics of use.

Step 1 — Add Cinemachine to your project:

Cinemachine is readily available through the Unity Package Manager.

Step 2— Create a virtual camera

Virtual cameras are used to control the main camera in the scene. They allow the main camera to be moved and rotated and can control the camera’s settings. When a virtual camera is added to the scene, the main camera receives a Cinemachine brain component:

The Cinemachine brain component will monitor all virtual cameras in the scene and determine which one is live. The live camera can be changed by activating/de-activating virtual cameras, changing virtual camera priorities, or by composing shots with Unity’s Timeline. The brain will determine which virtual camera will be live.

Virtual Camera Settings:

A quick discussion about some of the key settings on the virtual camera:

Status: If you click the Solo button this will activate the current virtual camera. This is useful if you have multiple virtual cameras of different priorities and you need to see the view from the current virtual camera.

Priority: This sets the priority of the current camera and is useful when there are multiple virtual cameras in the scene. The virtual camera with the highest priority will generally be the one we view the scene from.

Follow/LookAt: These are used to tell the camera what it should be following and what to aim at. These are optional, but useful to set up things like a follow camera or to keep a moving camera focused on one thing in the scene.

Dead Zone Settings: The dead zone is the area where Cinemachine will keep the target in. The dead zone is seen below, represented by the clear rectangle around the capsule in the middle of the frame. The size of the dead zone rectangle can be modified by changing the dead zone settings.

Soft Zone Settings: The soft zone is represented below by the light blue rectangle surrounding the dead zone. When the object followed (the capsule in this case) moves into the soft zone, the virtual camera will reposition so that the followed object is back in the dead zone.

There are obviously many other useful settings with virtual cameras. This was a brief overview of how to import Cinemachine into your project and get a virtual camera set up. In a future article I will cover how to integrate multiple virtual cameras with Timeline to set up a multi-shot cutscene.

--

--

Jon Jenkins

A Unity Developer, interested in all things Unity.