Cinemachine Dolly Track in Unity

Hal Brooks
3 min readAug 13, 2021

--

Objective: Create an animation using Cinemachine Dolly track in Unity.

Look at the previs to guide cutscene development, see below.

Fade in, lights flash on Darren as camera tracks around security guard.
Overhead shot tracking toward ceiling as game fades to black with restart/quit buttons appearing.

Place the Captured_Cutscene prefab from The Great Fleece from the Unity Store between the four columns in front of the sleeping guard’s desk. Rename the Captured Cutscene to Actors. Create an empty game object named Captured_Cutscene and drag the Actors into this new object. Based upon the previs two new cameras will be required. From the Cinemachine menu in Unity, add two virtual cameras named CM_Darren_Shot and CM_OH_Shot. Position the scene view for each virtual camera and assign using Ctrl+Shift+F.

CM_Darren_Shot virtual camera perspective.

Selecting Captured_Cutscene, create a timeline named Captured_Time_Line. Add a Cinemaching track and assign the Main Camera, i.e. CinemachineBrain, to the track. Drag CM_Darren_Shot and CM_OH_Shot onto the Cinemachine track in the timeline. Add an animation track and drop Captured_Cutscene_Pos under actors into the track. Use the stacked dots menu on the track to add the CapturedAnimation, see below.

Adding animation to timeline.

Create a Dolly Camera with with Track and delete the camera it creates, adding three waypoints with the coordinates below

Assign the Dolly Track to the CM_Darren_Shot virtual camera by selecting Tracked Dolly from the Body menu. Drag the dolly into the Path, and create a new animation track in the time line.

Animation dolly track for the virtual camera at position 2.

Add the CM_Darren_Shot to teh animation track and create the animation by recording the waypoint by changing the body path position in the inspector assigning 0 to 0 seconds, 1 to about 2:15 seconds and 2 at 4:20 seconds.

CM_Darren_Shot CinemachineVirtualCamera settings.

To control the virtual camera’s view add an animation track and drag in the Darren Target under Actors, Captured_Cutscene_Pos within the captured cutscene. Also assign Darren Target as CM_Darren_Shot virtual camera Look at foci. Record different positions corresponding to dolly waypoints, adjusting their position to follow the rule of thirds as the camera moves.

Animation using Cinemachine dolly track and Unity timeline.

--

--

No responses yet