Sleeping Guard Interaction

Manage camera and actors in mid game cutscene

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.

--

--

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
Tristan Engel

Tristan Engel

18 Followers

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