Aiming Features in Cinemachine
Introducing the aiming features of a “Look At” target in a nutshell!
Aim Algorithms
To access the Aim properties, the Look At target must not be null. So we must have a target to look at! Aiming properties specifies how to rotate the virtual camera around the “Loot At” target.
Each aim algorithms have different properties of rotating the camera.
- Do Nothing: Do not procedurally rotate the Virtual Camera.
- Composer: Keep the Look At target in the camera frame.
- Group Composer: Keep multiple Look At targets in the camera frame.
- Hard Look At: Keep the Look At target in the center of the camera frame.
- POV: Rotate the Virtual Camera based on the user’s input.
- Same As Follow Target: Set the camera’s rotation to the rotation of the Follow target.
Each comes with different properties to rotate the camera around the Look At target.
I’ll focus on the “Composer” algorithm property.
Composer and its Properties
Composer is an “Aim” algorithm that rotates the camera to face the “Look At” target.
To understand the visual elements of the provided images, let's understand the Game Window Guides. Game Window Guides provide visual feedback of the property values changed. It consists of a dead zone and a soft zone.
The dead zone is the area in which the virtual camera ignores the target. The soft zone is the area where the camera will track the target. Outside of the soft zone is out of bounds for the camera.
Tracked Object Offset
We can offset our camera from its current Look At target. It’s based on the X-Y-Z world position.
By moving the X position back and forth, you can see that the camera offsets from the Look At target.
Lookahead Time and Smoothing
Lookahead calculates where the target is going in seconds into the future. It’s useful when you want to look ahead of the target.
Raising the lookahead smoothing property will smoothen the jittery movement of the camera.
Lookahead Ignore Y property toggles to ignore movement along the Y-axis for lookahead calculations.
Horizontal and Vertical Damping
Horizontal and Vertical Damping specifies how responsive the camera follows the target. Smaller numbers are more responsive. Higher numbers give a slowly responsive camera.
Screen X and Y
The screen is the positioning of the center of the dead zone.
Dead Zone Width and Height
The dead zone is the screen region within which the camera ignores any movement of the target.
Soft Zone Width and Height
When the camera reaches the soft zone, the camera will rotate to push it back out to the dead zone, in the time specified by the damping.
The soft zone bounds are closer to the dead zone with the specified values of the properties.
With higher damping, the camera will not allow the target to reach outside of the soft zone.
Bias X and Y
Bias positions the soft zone horizontally/vertically, relative to the dead zone.
Conclusion
We now have knowledge of what the dead and soft zones are and several properties that enhances the feel of the camera’s rotation around the target! Let us mess with them some more to have a better grasp of each property.
Gabriel