Animate game objects using Timeline — Stealth 3D game

Hernando Nieto Jaramillo
3 min readJul 27, 2021

After finishing the game over cut scene, we will create the Level complete cut scene.

  • Drag and drop the Win_Level_Cutscene to the hierarchy. Unpack the prefab completely. Rename it to Actors. Place it in the desired scene’s position.
  • Create an empty game object. Reset its position. Rename it to LevelComplete_Cutscene
  • Drag and drop Actors as a LevelComplete_Cutscene’s child

Animating the character

  • With LevelComplete_Cutscene selected, create a new Timeline (Playable director)
  • Add an animation track in Timeline.
  • Drag and drop Actors from hierarchy to the animation track
  • Add an animation clip, but first we need to search it in the assets
  • Select Actors in the hierarchy and double click on EndLevel Controller

The animation is EndLevelCutscene

  • Select again LevelComplete_Cutscene in hierarchy, Add from Animation clip and select it from the list

You can click on Play in the Timeline editor to preview the changes

Blending virtual cameras

  • Create a new CM virtual camera and rename it (for instance, CM Full shot)
  • Place it in the desired position for the shot
  • While LevelComplete_Cutscene game object selected in hierarchy, drag and drop the main camera to Timeline. Select Create a new Cinemachine track
  • Right click on the track panel and select Add Cinemachine shot
  • With the cinemachine shot selected, go to the inspector and set the CM Full shot game object as Virtual Camera
  • Create a new CM virtual camera. Rename it (for instance, CM Close up)
  • Position the CM in the shot’s place
  • Create a new Cinemachine shot in the Timeline with the CM Close up

For blending both cameras, move the right shot a bit over the left one

Result:

In the next blog we will see how to create a fading UI in cut scenes with Timeline

--

--