CCTV System
Purpose and Scope
The CCTV System implements security and surveillance cameras that the player can connect to, control via remote consoles, and that can alert nearby AI when they detect the player.
This document targets gameplay programmers and technical designers and focuses on runtime behavior, core actors, and how CCTV integrates with interaction, AI, UI, and the save system. DataAsset fields and editor setup details are intentionally left to How-To and Reference docs.
High-Level Architecture
At a high level, the CCTV System consists of four layers.
- Camera actors –
BP_Inter_SpyCameraand its children implement actual in-world cameras, including rotating and security variants. - Remote control consoles –
BP_Inter_SpyCameras_RemoteControllets the player connect to cameras, switch channels, and power them on or off. - UI widgets –
WB_UI_MapCameraMarkerfor map markers andWB_SpyCamerasManager_Staticfor displaying the live video feed. - Save and AI integration –
FSaveData_CamerasinsideS_SaveContainerpersists camera state, while AI treats CCTV alarms as sound-based points of interest.
Cameras are regular world interactables discovered by
BP_InteractComponent via BPI_Interactables /
BPI_MulticlassData, and they reuse the same interaction and
save patterns as doors and other stations.
Core Components
Camera actors
All camera types live in the BP_Inter_SpyCamera*
hierarchy.
BP_Inter_SpyCamera- Base interactable camera class.
- Inherits from the generic
BP_Inter_*item family and implementsBPI_InteractablesandBPI_MulticlassData, soBP_InteractComponentcan highlight and use it like any other world interactable. - Exposes a “connect to camera” interaction and provides a view source
for
WB_SpyCamerasManager_Static.
BP_Inter_SpyCamera_Rotate- Child of
BP_Inter_SpyCamera. - Adds automatic left-right scanning over a sector; current rotation
and movement state are saved in
FSaveData_Cameras.RotationAngleandFSaveData_Cameras.Moving.
- Child of
BP_Inter_SpyCamera_Sequrity- Master class for security cameras that can detect the player.
- Owns a detection zone (see “Detection and Alarm”) and, on detection, enters alarm state: plays a siren sound and lights the camera red.
BP_Inter_SpyCamera_Sequrity_Rotate- Child of
BP_Inter_SpyCamera_Sequrity. - Combines security detection with automatic scanning, and restores
both angle and movement flag from
FSaveData_Camerasafter load.
- Child of
Remote control console
BP_Inter_SpyCameras_RemoteControl- World actor representing a CCTV control console.
- Uses the standard interaction pipeline to open a camera control UI, connect to cameras, and issue power/channel commands.
- Talks to cameras via
BPI_SpyCameraSubsystemrather than directly, so logic stays decoupled.
UI widgets
WB_UI_MapCameraMarker- Map/minimap marker for cameras.
- Displays a red blinking dot; if the dot is visible and blinking, the corresponding camera is currently active.
WB_SpyCamerasManager_Static- The main viewing widget that displays the selected camera’s video feed.
- Remote consoles switch which camera feeds into this widget when the player changes channels.
Runtime Behavior
Player interaction
- Cameras and remotes are discovered by
BP_InteractComponentusingBPI_InteractablesandBPI_MulticlassDatalike any other interactable. - When the player looks at a console and presses the interaction key
(
IA_Interact), the console:- opens the CCTV UI,
- queries available cameras through
BPI_SpyCameraSubsystem, - connects to the default or last-used camera, projecting its view
onto
WB_SpyCamerasManager_Static.
Direct interaction with a camera (if exposed) can also connect to that specific camera without going through a console, but the primary flow is via remote controls.
Remote control modes
BP_Inter_SpyCameras_RemoteControl exposes configuration
used to decide which cameras are available from a given console.
PreDefinedSpyCamerasList(array ofname)- List of tags; any camera whose tag is present in this list is considered “reachable” for this console in pre-defined mode.
SpyCameraControllerType(enumE_SpyCameraControllerType)Allowed All Cameras– the player can connect to any camera in the level.Pre-defined cameras– the player can only connect to cameras that have tags inPreDefinedSpyCamerasList.
At runtime the console:
- Requests a list of cameras from the CCTV subsystem via
BPI_SpyCameraSubsystem. - Filters them according to
SpyCameraControllerTypeandPreDefinedSpyCamerasList. - Provides a channel list in UI and switches the active camera for
WB_SpyCamerasManager_Staticwhen the player cycles channels.
The console can also send power on/off commands; powered-off cameras should not provide a video feed or appear as active on the map.
Detection and Alarm
Detection zone
Security cameras use a rotating detection zone implemented as a standard mesh component rather than a special sight component.
- Each such camera owns a
StaticMeshComponentnamedCone. - The cone is attached to the camera and rotates together with it, including auto-scanning in rotating variants.
- Blueprint logic uses the cone’s volume/orientation to check whether the player is within the monitored sector.
There is no separate
CCTVSightComponent; using a plain mesh keeps the system
simple and familiar to designers.
Stealth relationship
The CCTV System does not integrate with the global stealth system.
- Cameras do not use stealth visibility tags or shared visibility checks.
- Being seen by a camera is handled exclusively by the camera’s own cone-based detection logic.
This allows stealth and CCTV to evolve independently; if needed, a future iteration can bridge them via shared gameplay tags or a dedicated interface.
Alarm behavior and AI reaction
When a BP_Inter_SpyCamera_Sequrity* camera detects the
player:
- It enters an alarm state:
- plays a configured siren/alarm sound cue,
- changes its visual appearance (e.g. turns red).
- It does not directly issue orders to AI controllers.
- Instead, AI agents respond through the existing sound/perception
system:
- the alarm sound is perceived as a new point of interest,
- nearby AI behavior trees receive this stimulus and move to investigate according to their standard logic.
This mirrors how grenades, weapons, and other noisy events drive AI behavior via sound cues rather than tight coupling.
Save System Integration
Save container and lifecycle
CCTV state persists via the global save system alongside other interactables.
- Global container:
S_SaveContainer. - Cameras use a specific struct
FSaveData_Cameras, stored insideS_SaveContainer.
Typical flow:
- On save, a CCTV manager or each camera implementing
BPI_SaveSystemserializes its state intoFSaveData_Camerasentries. - On load, all
BPI_SaveSystemactors are removed and respawned fromS_SaveContainer; for cameras, this includes applyingFSaveData_Camerasto restore behavior.
FSaveData_Cameras
FSaveData_Cameras tracks per-camera state necessary to
resume behavior accurately.
State- High-level logical state; typically encodes power (on/off), alarm vs normal, or other discrete modes.
RotationAngle- Current yaw (or equivalent) at save time.
- Used by rotating cameras to resume scanning from the exact angle instead of resetting to defaults.
Moving- Boolean flag that indicates whether the camera was in auto-rotation/scanning mode.
- On load, this flag decides whether to re-enable scanning logic.
On restore, the system:
- Spawns the correct Blueprint
(e.g.
BP_Inter_SpyCamera_Sequrity_Rotate). - Sets rotation from
RotationAngle. - Re-enables scanning if
Movingis true. - Applies
Stateto drive materials, alarm status, power, and UI indicators.
Integration and Limitations
Integration points
The CCTV System relies on and interacts with several existing subsystems.
- Interaction System
(
interaction-and-items.md)BP_InteractComponentdiscoversBP_Inter_SpyCamera*andBP_Inter_SpyCameras_RemoteControlviaBPI_Interactables/BPI_MulticlassDataand triggers interaction viaIA_Interact.
- Doors and Interactables
(
doors-and-interactables.md)- CCTV reuses patterns established for other stations (wardrobe, wash)
and the generic
BPI_SaveSystemintegration.
- CCTV reuses patterns established for other stations (wardrobe, wash)
and the generic
- Save System (embedded in system docs; planned
save-load-system.md)S_SaveContainer,BPI_SaveSystem, andFSaveData_Camerasdefine how camera actors are persisted.
- AI System (planned
ai-system.md)- Cameras use sound cues as stimuli; AI uses its existing perception/behavior trees to interpret those cues as investigation points.
- Map and Minimap System (planned
map-and-minimap-system.md)WB_UI_MapCameraMarkerintegrates into the global marker system to show active cameras on the map.
Scope and limitations of this document
This file intentionally focuses on runtime behavior and high-level architecture.
Out of scope here:
- Detailed lists of Blueprint variables and DataAsset fields for cameras and consoles.
- Exact UI layout and visual design of CCTV UIs.
- Step-by-step setup of new cameras, remotes, or map markers.
Related docs
- How-To:
how-to-add-cctv-camera.mdandhow-to-setup-cctv-remote-console.md(adding new cameras, wiring them to maps and remotes, editor steps). - Reference: a possible
reference-cctv-data-assets.md(field-by-field description of any CCTV-related DataAssets and enums) and updates to Gameplay Tags / Components reference docs if CCTV introduces new tags or interfaces.