Virtual Camera Follow Features and ‘Body’ in Cinemachine

We’ve previously delved into the Aim features and how they navigate the rotation of the camera in relation to a Look At target, but we can also manipulate the position of the camera with a Follow target.

Using a simple animation on a cube, and setting this to be the Follow target, we can quickly see that no matter where the cube moves, the camera will follow.

When setting a Follow target, we gain access to the Body features, that work in a similar sense to Aim within Look At — allowing for all kinds of customization!

Just like our Aim features, we have different types of Body settings. Some of these function with a lot more complexity, so we will dive into them in a future article. By default, we can stick with the Transposer to allow for a simple, but flexible manipulation.

Within the Transposer type we can set a Binding Mode. This determines the coordinate space in which the offset and damping are applied. Each of these contains various different settings allowing for all sorts of applications, but again, this is a deep topic that can be explored in depth in another article. For now we can use the default Lock To Target With World Up mode.

This mode allows for the virtual camera to follow the object at an offset, whilst ignoring any rotation except for the yaw (y axis). Therefore no matter where the tracked object moves, we will always follow a particular face of said object with the specified offset. The camera will always look in one direction, but if the tracked object rotates around the Y axis, the camera will bank around to keep that positional offset, which may put the target out of view. When we start to combine this with the Look At and Aim features, we can create all sorts of interesting movement.

Our Follow Offset works as a local vector in relation to the target. An X, Y, and Z of 0 would place the camera in the middle of this cube. But if we set a Z value of -10, the camera is placed ‘behind’ the target. As the target rotates, so too does this Vector, as seen in the above gif, the camera’s position stays 10 units back on the Z axis, allowing an arc rotation to be set up in relation to the center target.

Much like our Aim features, we can also apply Damping to the individual axes. Damping is how responsively the camera moves to keep it’s offset. Smaller numbers result in snappier movement, with larger numbers allowing for a slower move.

Axis Damping is simply relative to the targets movement. For the follow speed in regards to the targets rotation, we can use Pitch, Yaw, and Roll Damping, which again handles movement speed to keep the offset, but dependant on the X, Y, and Z axes respectively.

As we dive deeper into Binding modes tomorrow, we will come across more advanced parameters we can adjust for further manipulation!



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