Unity Cinemachine— Aiming Features

Luke Duckett
3 min readFeb 10, 2022

--

In this quick article, I will go over the different aiming features available in in Unitys Cinemachine.

When you create and place a virtual camera into your scene Unity creates a game object with “CinemachineVirtualCamera” component attached (and attaches a “CinemachineBrain” component to your main camera if there is none attached”.

On your virtual camera, you are able to assign an object for your camera to track by assigning it to the “Look At” reference.

Assigning a value to the “Look At” field gives you access to the “Aim” settings.

You can set Aim property to any of the following:

Composer:

This keeps the target in the centre of the frame and provides you with a bunch of setting you can use to offset the camera from the game object.

Tracked Object Offset: You can set the Tracked Object Offset which allows you to offset the camera from the target object.

Lookahead: This setting will adjust the camera based on the current motion of the target game object using an algorithm to calculate how far ahead to look. You can adjust the length of time to look ahead, the smoothing of the movement of the camera and finally, you can ignore the y axis when calculating the movement of the object.

Damping:

This setting adjusts how far the object can move from center frame before the camera begins to follow. The horizontal and vertical settings can be set independently.

Screen x & y: adjusts the center position of the dead zone on the x and y axis.

Dead zone width and height: adjusts the width and height of the dead zone. The dead zone is the area in which the game object move around in without the camera moving.

Soft zone width and height: adjusts the width and height of the soft zone. The soft zone is the area where the camera will move with the target game object to attempt to push it back into the dead zone, the speed/smoothness based on the damping setting.

Bias X and Y: adjusts the soft zone relative to the dead zone

Group Composer:

This allows you to have multiple targets in the camera frame (generally used with a target group camera) the settings are generally the same as the composer settings.

POV: this rotates the camera based on the user's input.

Same As Follow target:

This sets the rotation of the camera to the same as the target game objects’ rotation.

Hard Look At:

This keeps the look at target in the centre of the camera frame. This removes other aim settings and just keeps the object in the centre frame.

Thats all for now.

--

--

Luke Duckett

🎮 First Nations Unity Dev from Wonnarua country 🏞️ | From Player to Lifelong Learner: Crafting Games, Debugging Code, and Embracing New Technology