Introduction to Timeline
Moving between cinemachine shots
Objective: Use Unity’s Timeline feature to shift from one camera to another
The Unity Timeline is a feature that allows you visually play animations, disable or enable game objects, edit music, play particles, and more along a time axis.
In this article, I will demonstrate how I used Timeline to cut between two shots.
In this scene, I have positioned two Cinemachine cameras. One camera is an over-the-shoulder view of my main character and the second gives another view with a focus on the security card.
Creating a Cinemachine Track
Open the Timeline window, go to Window > Sequencing > Timeline.
Selected the game object and in the Timeline window, click the Create button to add a Director component to the selected Game Object.
Create a new folder, rename it to Timeline and the file.
Now I do not want an animator controller on this game object so I will remove it and remove the animation on the Timeline.
Next, we want to add our first cut to the Timeline, let’s change the Timeline from showing frames to seconds.
Now we want to have the Cinemachine Brain in the Timeline so the easiest way is to drag the Main Camera onto the Timeline and Add a Cinemachine Track
To add a shot to the Timeline, right-click the Timeline and select Add Cinemachine Shot. For this, I only want to shot it for 2.5 seconds before moving to the second shot. I’ll move it to the start and then adjust the length.
I’ll add another Cinemachine shot for 2.5 seconds next to it.
Now I am ready to add my two cameras to them. Click on the first Cinemachine Shot and drag the first camera to the Virtual Camera in the Inspector and do the same for the other Cinemachine shot.
Now if you scrub through, you can see the shot change. You can also press the Preview button to see this occur in the game view.
For a fancier transition, you can grab the start of the second shot and have it blend the camera from the first position to the second camera’s position.
That’s the end of this section on how to shift from one camera to another using Timeline. In the next article, Unity’s Timeline Animation, I’ll show you how to use Timeline for animations to activate a model’s animation.
If you enjoyed reading this article give me a Clap, also if you would like to see more, “Follow” me, so you may be notified of future releases. You may also send me a message if you need any further help.