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.

object→BaseEffect→ScreenShake
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.CameraEffectSystem.ScreenShake : Sandbox.CameraEffectSystem.BaseEffect

Constructors1

Showing 1 constructors

Methods2

Showing 2 methods

public virtual void Evaluate(float scale, Vector3 position, Angles angles, float fieldOfView)PUBLICVIRTUAL

ParameterTypeDescription
scalefloat—
positionVector3—
anglesAngles—
fieldOfViewfloat—
Returns:void—

public virtual void Update(float delta)PUBLICVIRTUALPER-FRAME

ParameterTypeDescription
deltafloat—
Returns:void—

Properties2

Showing 2 properties

public float Sandbox.CameraEffectSystem.ScreenShake.Amplitude { get; set; }PUBLICGETSET

How far the view gets thrown, in world units. Settable while the shake runs.

Returns:float—

public float Sandbox.CameraEffectSystem.ScreenShake.Frequency { get; set; }PUBLICGETSET

Direction changes per second - low is a slow lurch, high is a violent tremble.

Returns:float—

On this page