struct

CameraShakeComponent

Trauma-based camera shake (Squirrel Eiserloh GDC pattern). Attach to the camera entity; CameraShakeSystem decays trauma every frame and writes the resulting offsets into the runtime fields, which CameraSystem folds into the camera's view matrix on assembly.

Module
Camera
Header
#include "Camera/Components/CameraShakeComponent.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Properties

TypeNameDescription
boolenabledDefault true.
floattraumaCurrent trauma level. 0 = no shake, 1 = max. Decays toward 0 at traumaDecay per second. Gameplay code adds trauma via AddTrauma() — exposed in the inspector so designers can preview the feel. Default 0.0f.
floattraumaDecayDefault 1.5f.
floatmaxOffsetPositionMaximum positional amplitude in world units. Effective shake is trauma² × maxOffset so most of the budget kicks in past 0.5. Default 0.3f.
floatmaxRotationAngleMaximum angular amplitude in degrees (small yaw/pitch/roll perturbations layered on top of the camera's orientation). Default 5.0f.
floatnoiseFrequencyHow rapidly the shake direction flips. 25 Hz matches typical hand-held-camera feel; lower for ground-rumble, higher for jitter. Default 25.0f.
uint32_tnoiseSeedDeterministic seed. Two shake components with identical seeds produce identical motion — bump for variety across cameras. Default 1u.
Vec3currentPositionOffsetRuntime — written by CameraShakeSystem each frame, read by CameraSystem when assembling the active view matrix. Rotation offsets are stored in radians as (pitch, yaw, roll) for direct composition with the camera basis. Default Vec3(0, 0, 0).
Vec3currentRotationOffsetRadDefault Vec3(0, 0, 0).
floatelapsedTimeDefault 0.0f.

Public functions

ReturnsNameDescription
voidAddTraumaAdditive — multiple explosions stack until the cap.

Function details

AddTrauma

C++
void AddTrauma(float delta)

Additive — multiple explosions stack until the cap.

Generated from Camera/Components/CameraShakeComponent.h via camera.json · Oct 26, 2026Version 1.0.0