camera Shake

Shake the camera view to create a shock effect.

scene.cameraShake(4, 1000)

Parameters

  • amplitude: a number maximum offset the camera will move.
  • duration: a number duration in milli-seconds

Example

Shake the camera view for 1 second.

scene.cameraShake(4, 1000)

See also

camera follow sprite