ShakeCamera - Game

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

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.

Syntax[edit | edit source]

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

Parameters[edit | edit source]

  • 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 Value[edit | edit source]

None.

Examples[edit | edit source]

; 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 Also[edit | edit source]