Create a cutscene using Cinemachine

Cinemachine is a feature of Unity which gives you control over the camera and makes it possible to create professional looking cutscenes. Below I will go over the steps how to use it.

To add Cinemachine to your project open the Packet Manager and install:

Cinemachine will work best together with Timeline. Add it to the scene similar to how I did it in this article:

For the scene in this article we will need to two cameras. One from behind the main character and one that will show how the main character is taking a key card from a sleeping guard. You access the Cinemachine camera menu from the top toolbar:

For this scene I used pre-animated actors which has been turned into a prefab with the sole purpose of making up the scene. These are then put into the correct location in the scene view:

After the actors have been placed I put the cameras into their starting positions. The easiest way to positions cameras is to use the scene view and then with the camera selected click on “Align with view”:

When you add Cinemachine to your project the main camera will get a Cinemachine brain component. This is the component that will help us control the cameras on the Timeline. Hook up the camera with Timeline by simply dragging the main camera onto the Timeline and select Cinemachine track:

You can now drag in the two virtual cameras. To tidy up the hierarchy I added the cameras as children of an empty game object and made that game object a child of the Timeline object:

I also have my layout adjusted a bit now so that it is possible to see both the Game window and the Timeline window:

Something I will not use for this cut scene but worth noting is that you can blend the cameras by dragging one over the other on the Timeline:

When you play the game now actors will animate automatically. In order to be able to see the animations in the editor we need to add an animation track. Drag in the object with the animations and add the animation clip:

To move the first camera we will animate it in a similar manner as I showed with the spaceship in the Timeline article. Create an animation track and add the camera. Move as well rotate the camera to record frames:

For the second camera I will use a slightly different approach and add a game object that the camera will look at and animate that object instead:

Ensure that Aim is set to Composer and adjust the dead zone. The camera will only rotate towards the object if its outside of the dead zone:

Animate the camera target and you can see the second camera follow it:

Final result:

Good luck!



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