Cam::shakeCinematic

From RAGE Multiplayer Wiki
Revision as of 18:59, 5 November 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Explanation

This function triggers a cinematic camera shake effect, allowing you to specify the shake type and intensity. This can be useful for enhancing in-game events like explosions or impacts with visual effects.

Required Params

  • type: string - Type of shake effect.
  • intensity: number - Intensity of the shake (0.0 - 1.0).

Available Shake Types

  • "HAND_SHAKE"
  • "SMALL_EXPLOSION_SHAKE"
  • "MEDIUM_EXPLOSION_SHAKE"
  • "LARGE_EXPLOSION_SHAKE"
  • "JOLT_SHAKE"
  • "ROAD_VIBRATION_SHAKE"
  • "DRUNK_SHAKE"
  • "VIBRATE_SHAKE"

Return value

  • void

Syntax

mp.game.cam.shakeCinematic(type, intensity)

Example

The following example applies a hand-held camera shake effect with medium intensity:

mp.game.cam.shakeCinematic("HAND_SHAKE", 0.5);


See also