Day 29: Animating a camera with a dolly track and fading in UI for our Game Over state

Philip Johnson
3 min readSep 30, 2021

Goal: To create a controlled orbiting effect during a cutscene and to reveal menu options to the player during the Game Over state.

For the Game Over state of the game, we will use a special cutscene to animate the camera so that it orbits around the player and presents some options to the player at the end. To get started we will set up a cutscene object just like we did in the last article. The new addition to this one will be a child canvas object that holds our UI that will pop up at the end of a cutscene. To animate the camera in this fashion we need to create a cinemachine dolly track.

As seen in the image above, creating a Cinemachine dolly track will give us an object that has THREE manipulators. You will arrange this track in such a way to match your vision with this semi-orbiting effect. To animate this camera we need to adjust the target virtual cam’s body parameter. We will simply assign the Dolly Track object here.

You will be animating the path position of the virtual cam to create the orbiting effect.

Now for the UI part of this cutscene, we will simply animate the fading in and out of this cutscene. Because this canvas object is a child of the cutscene, it wont be visible during gameplay while the cutscene is inactive. In a later article I will cover how to activate a cutscene during run time.

The important thing to pay attention to is keeping the buttons from being interactive until they fade in fully. To achieve this you can simply animate the enabling and disabling of the Raycast Target parameter. I simply animate it to be false up until the end of the animation.

--

--