Camera Mode: Shake
Sinusoidal camera shake filter that adds continuous oscillating position and rotation offsets. Creates a smooth, rhythmic shake effect for cinematic or impact scenarios.
Sinusoidal camera shake filter that adds continuous oscillating position and rotation offsets. Creates a smooth, rhythmic shake effect for cinematic or impact scenarios.
Overview
A hidden filter that applies sine-wave-based position displacement and rotation perturbation. Unlike the noise mode (which is random and choppy), shake produces smooth, periodic oscillation with configurable amplitude and frequency per axis.
Class Properties
| Property | Type | Default | Description |
|---|---|---|---|
isFilter | bool | true | Post-processes other camera output |
hidden | bool | true | Not selectable by the user |
amp | vec3 | (0.08, 0.05, 0.03) | Position amplitude per axis |
freq | vec3 | (0.05, 0.04, 0.03) | Oscillation frequency per axis (Hz) |
timeOffset | vec3 | (0, rand, rand) | Phase offset per axis |
time | number | 0 | Accumulated time |
Methods
| Method | Signature | Description |
|---|---|---|
init | C:init() | Set default amplitude/frequency/phase |
update | C:update(data) | Apply sinusoidal offset to pos and rot |
Shake Calculation
-- Sinusoidal position offset per axis
local offset = vec3(
self.amp.x * math.sin(2π * (self.timeOffset.x + self.time) * self.freq.x),
self.amp.y * math.sin(2π * (self.timeOffset.y + self.time) * self.freq.y),
self.amp.z * math.sin(2π * (self.timeOffset.z + self.time) * self.freq.z)
)
-- Rotation perturbation from position offset (scaled to degrees→radians)
local rotEuler = offset * 10 * π/180
data.res.rot = data.res.rot * quatFromEuler(rotEuler.x, rotEuler.y, rotEuler.z)
data.res.pos = data.res.pos + offsetKey Notes
- Different frequencies per axis prevent repetitive-looking patterns
- Random phase offsets on Y/Z axes ensure each session looks different
- Both position AND rotation are affected (rotation = 10× position in degrees)
- Default frequencies are very slow (0.03–0.05 Hz) - subtle breathing effect
- For impact shake, increase
ampandfreqsignificantly
See Also
- Camera Mode: Autopoint - Related reference
- Camera Mode: Autozoom - Related reference
- Camera Mode: Big Map - Related reference
- Core Systems Guide - Guide
Camera Mode: Relative
Vehicle-relative free camera with full 6DOF movement, saveable position slots, adjustable point light, and near-clip control. The primary camera for cinematic vehicle photography.
Camera Mode: Smooth
Spring-based position smoothing filter. Applies temporal spring smoothing independently to each axis of the camera position to reduce jitter and sudden jumps.