How to use Dolly Tracks in Unity

Calum Slee
2 min readAug 12, 2021

Rather than just animating the transform position of our cameras, we can also tap into the real world technique of using a dolly track. A dolly track allows for a camera to follow its target along a path, generally on rails. Unity allows us to create these paths so we can then much more reliably animate our cameras.

Say for instance we wanted to go back and forth, getting the same position every time is doable, but time consuming. With a dolly track, we can simply set our camera to move between different points across time.

In our Cinemachine tab, we can add a Dolly Camera with Track. This creates a new Virtual Camera, mounted to a dolly track. In the Inspector we can then edit and add waypoints for our dolly track, and I strongly recommend changing the color and width for easy visibility in the scene view.

Our Virtual Camera should have its Body section set to Tracked Dolly by default, or if you want to set a pre-existing camera to the Dolly Track, this is the section to change. If we then move the Path Position between 0 and our amount of waypoints, the camera will move along the path. This is the variable we can animate in our Timeline. The Virtual Camera will keep the same rotation though, and in our current scene, we want the dolly track to be panning around the main character. This is where the Look At target comes in. Our main character has been setup with an empty game object around the head position, so that we can use this as a target for our cameras.

Now we have a nice circling motion around the back of a guard whilst always staying focused on the main character.

--

--