How To Pan Your Cinemachine Cameras In Timeline
When you are setting up your cinematic with Timeline, you may want to animate your camera to move or pan around your scene during the shot.
Assuming that you have already followed along with the previous articles on setting up virtual cameras with Cinemachine and implemented them into Timeline, then this should be a piece of cake.
To start, you will need to select the cutscene game object in the hierarchy that contains the “Playable Director” component. Then right-click in your Timeline window and create a new “Animation Track” similar to when we animated our Actors. This time though, you will need to reference the specific camera that you are trying to animate. When you do this it should add an “Animator” component to your virtual camera game object. Don’t worry about attaching a controller or anything to it though as that will not be needed for what we are doing.
Now, select the cutscene game object in the hierarchy that contains the “Playable Director” component so that you can view your Timeline.
Make sure that the “Keyframe Marker” is set to the 0 seconds mark on the far left and select the record button. Then select the camera that you are animating in the hierarchy and adjust the transform’s position and/or its rotation. This will then generate a new “Key Frame” in Timeline. Now hit the “Record” button again to stop recording the new animation.
If you want the transform to stay where it is, you will still need to adjust the transform and then undo it back to where it was. Once the transform has been adjusted then, and only then will it generate a new “Keyframe” for your active Timeline.
Next, you will need to repeat the previous process but adjust the “Keyframe Marker” to the point in the timeline that you want the camera to start panning and end panning. Then hit record and adjust the camera’s transform accordingly. The camera will take the entire amount of time that you give it between keyframes to animate the transform changes. In other words, the more space between keyframes, the slower the camera moves as it animates. Now hit the “Record” button once again to stop recording the new animation and you are done.