Sleeping Guard Interaction

Manage camera and actors in mid game cutscene

Tristan Engel
2 min readOct 6, 2021

Mid Game Cutscene

In this article we show the challenges we faced when implementing our sleeping guard cutscene. This scene plays when we certain place in the game then we want to continue to play the game. Sounds easy, but it was quite different from our other cutscene implementations.

Things that need to be disabled at end of the cutscene

1 Camera fade UI image
2 Cutscene itself (can only be done by disabling parent gameobject instead)

Things that need to be disabled during cutscene and activated at the end

1 Our sleeping guard from the game and from the cutscene align perfectly so we didn’t need to disable him.
2 Player and other gameobjects that are also in the actors
3 Add end camera shot (new virtual cam)

Updated Timeline Result

We implemented all of the above into our timeline.
At the very end of the cutscene we added a new virtual camera. This is because the camera will stay at the location of the last camera from the cutscene. We fixed this by adding a new virtual camera that has the position of we want the camera to have after the cutscene is done playing.
In the last two frames there’s a lot of disabling and enabling. We disable our UI black image in second last frame. The switching of to the “return” camera position and the re-enabling of the player also happens in the second last frame. A frame later we disable the parent object of our cutscene so we return to the game after playback of the cutscene.

Virtual Camera Priority

We spend quite some time debugging. After the cutscene was played the camera would snap back to a certain virtual camera. This was because it had a higher priority set in the Inspector.

--

--

Tristan Engel

Aspiring developer that’s self-learning Unity & C# to transition to a career with Unity. I got a passion for creating interactive experiences.