ShakeCamera - Game

Member of: Game Script

Shakes the camera from the specified object's location, with the specified strength. The optional duration can be used to define how long to shake the camera. If no duration is provided then the fCameraShakeTime game setting will be used for duration.

SyntaxEdit

Function ShakeCamera(ObjectReference akSource = None, float afStrength = 0.5, float afDuration = 0.0) native global

ParametersEdit

  • akSource: Where to shake the camera from. If None, will shake the camera from the player's location
    • Default: None
  • afStrength: How hard to shake the camera. The value will be clamped from 0 to 1.
    • Default: 0.5
  • afDuration: How long in seconds to shake the camera.
    • Default: 0.0 (Use the game setting)

Return ValueEdit

None.

ExamplesEdit

; Shake the camera from the player's location at half strength
Game.ShakeCamera()


; Gently shake the camera from the player's location
Game.ShakeCamera(afStrength = 0.1)

See AlsoEdit