API Referenceglobal
ScreenShakeclass
The classic screen shake - a new random offset every 1/frequency seconds, blended by a squared-falloff sine envelope whose frequency ramps up as it dies, amplitude decaying as it goes. Position plus a little roll, never pitch or yaw. Half-Life's env_shake, byte for byte.
Constructors1
Showing 1 constructors
public ScreenShake()
No results match this filter.
Methods2
Showing 2 methods
public virtual void Evaluate(float scale, Vector3 position, Angles angles, float fieldOfView)
| Parameter | Type | Description |
|---|---|---|
| scale | float | — |
| position | Vector3 | — |
| angles | Angles | — |
| fieldOfView | float | — |
Returns:
void—public virtual void Update(float delta)
| Parameter | Type | Description |
|---|---|---|
| delta | float | — |
Returns:
void—No results match this filter.
Properties2
Showing 2 properties
public float Sandbox.CameraEffectSystem.ScreenShake.Amplitude { get; set; }
How far the view gets thrown, in world units. Settable while the shake runs.
Returns:
float—public float Sandbox.CameraEffectSystem.ScreenShake.Frequency { get; set; }
Direction changes per second - low is a slow lurch, high is a violent tremble.
Returns:
float—No results match this filter.