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
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.
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:
|
Editable Variables
The screen has the following exposed properties:
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
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.
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: |
Construction Script |
The Construction Script has no function. |
Event Graph |
The Event Graph performs the following task:
|
Editable Variables
The button has the following exposed properties:
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. |