Fighting Game · Guides & deep dives

V2 Camera Debug Visualization

aspect ratio, primitive duration, line thickness, and debug colors.

3sections1 minread

On this page

The camera debug visualization layer emits data-driven debug primitives for camera systems. Runtime drawing code can bind these primitives to Unreal debug draw calls without making the validation path depend on editor-only rendering.

Runtime Surface#

  • FV2CameraDebugVisualizationConfig configures draw toggles, frustum depth, aspect ratio, primitive duration, line thickness, and debug colors.
  • FV2CameraDebugVisualizationState carries the camera mode and spring arm endpoints.
  • FV2CameraDebugCollisionTrace carries trace start, end, optional impact point, and hit marker radius.
  • FV2CameraDebugLookAtTarget carries target id, location, radius, and selected state.
  • FV2CameraDebugPrimitive represents frustum, line, or sphere draw commands.
  • FV2CameraDebugVisualizationEvaluation returns emitted primitives and validation issues.

Debug Rules#

  1. Invalid config, state, traces, or targets are blocking.
  2. Frustum output emits one Frustum primitive carrying camera pose, FOV, aspect ratio, and depth.
  3. Spring arm output emits a line from origin to target.
  4. Collision traces emit trace lines and hit spheres when a trace hit is present.
  5. Look-at targets emit target spheres and camera-to-target lines.
  6. Selected look-at targets use doubled line thickness.
  7. Draw toggles suppress their corresponding primitive groups.

Validation Commands#

Run these targeted checks when touching camera debug visualization:

bash
python3 V2/ue/Tools/check-v2-camera-debug-visualization.py
python3 V2/ue/Tools/check-v2-camera-manager.py
python3 V2/ue/Tools/check-v2-ci-workflow.py
python3 -m json.tool V2/ue/Content/V2/Gameplay/Camera/CameraDebugVisualization_V2_Contract.json
python3 -m py_compile V2/ue/Tools/check-v2-camera-debug-visualization.py