Security Camera Switcher Button

An overview of the Security Camera and Alarm Blueprints.

Choose your operating system:

Windows

macOS

Linux

Tied into the existing camera Blueprints is a security control room. This room contains a security console surrounded by video screens. As the player presses a large button in the center of the console, the screens switch to show views from various security cameras placed throughout the level. These are the same security cameras, located throughout the level, that also trigger the alarm system if the player walks into their view.

Screen Blueprint

ScreenBlueprint.png

The Screen Blueprint is - at its heart - an optimized mechanism to switch between different Scene Capture Actors. The effect of the security cameras is created because of Scene Capture Actors located within each of the Camera Blueprints . The purpose of a Scene Capture Actor is to function very much like a camera, capturing an image of the pixels it can see. It then transmits those to a Render Target texture, which functions like an internal video screen. By applying this Render Target texture to a Material, you effectively create a Material that can show what the camera sees.

The catch? With many cameras running at the same time, it is possible to run into performance issues, since they would all have to be capturing and transmitting their current views. To alleviate this problem, the screen Blueprint will activate only one Scene Capture at a time, and deactivate the one that was used previously.

DeactivateSceneCapture.png

Blueprint Setup

The Components List, Construction Script, and Event Graph for this Blueprint perform the following tasks:

Blueprint Aspect

Purpose

Components List

The Components List for the screen is about as simple as you can get, containing only a single Static Mesh for the screen itself.

Construction Script

The Construction Script performs the following tesks:

Event Graph

The Event Graph performs the following task: When we receive a "Camera Swap" signal from the alarm interface:

  • Turn off the previous capture Actor

  • Play a Timeline that drives noise on the screen material.

  • Activate the next Screen Capture Actor.

  • Use a special texture and UV Coordinate in the screen's Material to change the text at the top of the screen.

Editable Variables

The screen has the following exposed properties:

ScreenProperties.png

Property

Purpose

Camera Blueprints

This array holds all of the Camera Blueprints that have been placed in the scene, which is how we have access to each of their Scene Capture Actors.

Button Blueprint

ButtonBlueprint.png

This large red button serves as a camera switcher, showing the different views of each security camera as it is pressed.

The button does its job by way of the same Blueprint Interface that powers interactions between the alarm and the cameras. As another piece of functionality within this Blueprint, a function can be called named Monitor Camera Swap . This is used like a remote event that can be called on specific Actors, namely the screens.

The button Blueprint also contains a Box Component which is used as a trigger volume. This is used to determine whether the player is in range of the button, and also used to determine whether the player should be able to see some help text that appears over the button, instructing the player to press the E key.

EToInteract.png

Blueprint Setup

The Components List, Construction Script, and Event Graph for this Blueprint perform the following tasks:

Blueprint Aspect

Purpose

Components List

The Components List for the Button is set up as follows: ButtonComponents.png

Construction Script

The Construction Script has no function.

Event Graph

The Event Graph performs the following task:

  • Check to see when the player enters the Box Component.

  • Once the player is within the Component, create some help text.

  • Keep that help text rotated toward the player.

  • While the player is in the Box Component, process inputs from the E key.

  • If the player presses E , animate the button and call the Monitor Camera Swap on all screens.

  • When the player exits the Box Component, destroy the help text and stop processing inputs of the E key.

Editable Variables

The button has the following exposed properties:

ButtonProperties.png

Property

Purpose

Screen Blueprints

Contains an array holding all of the Screen Blueprints in the scene.

Camera Blueprints

This array holds all of the Camera Blueprints that have been placed in the scene.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss