# Sandbox.Mapping.EnvShake

Shakes players' screens - and optionally physics objects - around a point. Half-Life's
env_shake. Call [Sandbox.Mapping.EnvShake.StartShake](/api/Sandbox.Mapping.EnvShake/StartShake) to set it off on every player, and it runs a
[Sandbox.Mapping.EnvShake.Duration](/api/Sandbox.Mapping.EnvShake/Duration) second cycle, the curves shaping it over that time. [Sandbox.Mapping.EnvShake.Loop](/api/Sandbox.Mapping.EnvShake/Loop)
repeats the cycle until turned off.

- Kind: class
- Namespace: `Sandbox.Mapping`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.Component](/api/Sandbox.Component)
- Modifiers: sealed

## Constructors

- [`EnvShake`](/api/Sandbox.Mapping.EnvShake/.ctor)

## Properties

- [`Amplitude`](/api/Sandbox.Mapping.EnvShake/Amplitude): How far the view gets thrown over the cycle, in world units.
- [`Duration`](/api/Sandbox.Mapping.EnvShake/Duration): Seconds one shake cycle lasts - the curves play out over this.
- [`Frequency`](/api/Sandbox.Mapping.EnvShake/Frequency): Direction changes per second over the cycle - low is a slow lurch, high is a violent tremble.
- [`GlobalShake`](/api/Sandbox.Mapping.EnvShake/GlobalShake): Shake every player in the scene at full strength, no matter where they are.
- [`Loop`](/api/Sandbox.Mapping.EnvShake/Loop): Restart the cycle when it ends, shaking until turned off.
- [`On`](/api/Sandbox.Mapping.EnvShake/On): Is the shake running? Local to this machine - map-placed shakes start everywhere because the scene ships with it set, but toggling it at runtime only affects this peer. Use [Sandbox.Mapping.EnvShake.StartShake](/api/Sandbox.Mapping.EnvShake/StartShake)/[Sandbox.Mapping.EnvShake.StopShake](/api/Sandbox.Mapping.EnvShake/StopShake) to run one on every player. A non-looping shake turns itself off when its cycle ends.
- [`Radius`](/api/Sandbox.Mapping.EnvShake/Radius): How far the shake reaches, fading to nothing at the edge. The view ignores this when [Sandbox.Mapping.EnvShake.GlobalShake](/api/Sandbox.Mapping.EnvShake/GlobalShake) is set - physics always uses it.
- [`Rumble`](/api/Sandbox.Mapping.EnvShake/Rumble): Rumble controllers along with the shake.
- [`Scale`](/api/Sandbox.Mapping.EnvShake/Scale): Overall strength over the cycle - fade the whole shake in or out without retuning the others.
- [`ShakePhysics`](/api/Sandbox.Mapping.EnvShake/ShakePhysics): Throw physics objects around within [Sandbox.Mapping.EnvShake.Radius](/api/Sandbox.Mapping.EnvShake/Radius) while shaking.
- [`ShakeView`](/api/Sandbox.Mapping.EnvShake/ShakeView): Shake the view. Turn off for a physics-only shake.

## Methods

- [`StartShake`](/api/Sandbox.Mapping.EnvShake/StartShake): Set the shake off on everyone, restarting the cycle if it's already running.
- [`StopShake`](/api/Sandbox.Mapping.EnvShake/StopShake): Stop a running shake on everyone.
