Cam::shakeCinematic: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
 
Line 3: Line 3:


==Explanation==
==Explanation==
This function triggers a cinematic camera shake effect. The intensity and style of the shake are determined by the parameters. This can add visual impact to events such as explosions, collisions, or high-speed moments, enhancing immersion during gameplay.  
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===
===Required Params===
*'''type:''' {{RageType|string}} - The type of shake effect to apply (e.g., "HAND_SHAKE", "SMALL_EXPLOSION_SHAKE").
*'''type:''' {{RageType|string}} - Type of shake effect.
*'''intensity:''' {{RageType|number}} - The intensity of the shake effect (typically ranges from 0.0 to 1.0).
*'''intensity:''' {{RageType|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===
===Return value===

Latest revision as of 18:59, 5 November 2024

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