Basic Pan Camera with Cinemachine in Unity

Creating a panoramic shot

Objective: Use a cinemachine virtual camera and Unity’s timeline to create a pan camera shot

First we have to go to Cinemachine tab and select “Create Virtual Camera”

Then in this case I created an empty game object and selected the option “create” in the timeline window.

In the timeline windows we have to select the plus sign and create a cinemachine track.

In the cinemachine track we have to drop the main camera of the scene. This is gonna create a new component in the camera called cinemachine brain allowing us to handle the camera for the shots in the timeline.

Next we have to go to the scene and position the camera for the shot, a cool thing in Unity is you can move in the scene and with the camera selected you can press ctrl + shift + F to align the virtual camera with the scene view.

Then we have to add the camera to the cinemachine track by dropping it in the timeline window.

To animate the camera we have to go to the timeline window and create an animation track.

After that you can press the record button and modify the position through the time in the timeline. Once you finished you can press the record button again to stop recording.

And that’s it!!! We have a beautiful pan camera shot for our game.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rusben Guzman

A Software Engineer passionate about game dev and interactive products with Unity. I consider video games to be the artistic expression of programming.