Creating Functional Security Cameras (Game Dev Day 63)

Jack Leavey
Jan 18, 2022

With the guards all finished up, I moved onto the two security cameras in the back of the level.

First, I used Unity’s Animator to make them pan back and forth

Changing the speed on the “Reverse” animation just runs the animation backwards. This creates a permanent loop effect.

Looping cameras

To make them “detect” the player, I used the same method as the guards’ “eyesight”; giving the green cone a collider and detecting the player through tags. The script then changes the camera’s color to red, freezes the camera (so it looks locked onto the player) and then after a half second delay, plays the Game Over cutscene.

Transitions to cutscene.

--

--

Jack Leavey

I am a software engineer with years of experience branching into game development, specifically in Unity. Follow along for guides on creating game mechanics!