Dolly tracks in Unity

Daniel Kirwan
3 min readJun 7, 2021

--

Objective: Create a camera pan using a Cinemachine dolly track camera

Dolly tracks in Unity are a great way to pan around objects or just to follow a character in a cutscene.

Above you can see the result for a small cutscene and this was just using two waypoints, imagine using 10 waypoints and having some characters act out a scene and you could move the camera in any way you want in the scene.

First, you need to add a dolly track camera to the scene. You can do this by clicking Cinemachine -> create dolly camera with track.

This will create a dolly track and a new virtual camera. Now, I didn’t need to the new camera so I deleted mine. I then needed to setup my virtual camera to follow a dolly track.

First, click on the virtual camera, then find the body section, click the drop down menu and select tracked dolly. Now you need to drag your dolly track into the empty space.

I now want my camera to face the caught character in the cutscene, so in the virtual camera I drag in the gameobject I want to follow.

Now, I need to set up the waypoints for my dolly track. Click on the dolly track and add a waypoint. This will add three objects to the dolly in the scene that you can move around.

  1. is the dolly position
  2. is the waypoint position
  3. is the tangent position

The waypoint position is where the camera will be and the tangent is used to create bends in the dolly track.

Once you have set up your dolly track it is now time to animate the movement in the timeline.

First add an animation track to the timeline, if you’ve read my other articles you already know how to do that. Now, click record and setup the first key frame. I clicked on my virtual camera and set the path position of the dolly track to 0, I then moved along in the timeline with the white arrow and once I’m at the correct time, I then change the path position to 1. Now click stop recording.

Now you can see you animation in the timeline window and review what it looks like.

And that is it for a simple dolly track in Unity. Come back for more Unity developer articles.

--

--

Daniel Kirwan
Daniel Kirwan

No responses yet