Skip to main content

Camera::stopShaking

JavaScript​

Required Arguments​

  • stopImmediately: Boolean

Syntax​

camera.stopShaking(stopImmediately);

Return value​

  • void

Example​

const cam = mp.cameras.new('newcamera', mp.players.local.position, new mp.Vector3(0, 0, 0), 40);
mp.game.cam.renderScriptCams(true, true, 1000, false, false, 0);

cam.shake("SMALL_EXPLOSION_SHAKE", 1.0);

//stop shaking camera after 5 seconds.
setTimeout(() => {
if (cam && mp.cameras.exists(cam)) {
cam.stopShaking(true);
}
}, 5000);