CameraShake class Gameplay kit

Procedural trauma-decay camera shake generator driven by deterministic noise.

Constructors

CameraShake({double decayRate = 1.2, double frequency = 25.0, Vector3? maxTranslation, Vector3? maxRotation})
Creates a camera shake generator with optional decay and limit parameters.

Properties

decayRate double
Linear trauma decay rate per second.
getter/setter pair
frequency double
Frequency multiplier for noise evaluation.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
maxRotation ↔ Vector3
Maximum rotational shake angles (in radians, pitch/yaw/roll) at trauma = 1.0.
getter/setter pair
maxTranslation ↔ Vector3
Maximum translational shake vector (in local units) at trauma = 1.0.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trauma double
Current stress/trauma level between 0.0 (still) and 1.0 (maximum shake).
getter/setter pair

Methods

addTrauma(double amount) → void
Adds a burst of trauma (e.g. 0.3 for a footstep, 0.8 for an explosion).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(double deltaSeconds) CameraShakeOffset
Advances the shake simulation by deltaSeconds and returns the offset.

Operators

operator ==(Object other) bool
The equality operator.
inherited