RealDocs

UGameplayStatics::PlayWorldCameraShake

function Engine Blueprint Since 4.0
#include "Kismet/GameplayStatics.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallable

Description

Triggers a camera shake for all local players whose cameras are within OuterRadius of the Epicenter. Intensity falls off based on distance and the Falloff exponent.

Caveats & Gotchas

  • This iterates all local players and calls their player camera managers — it is a client-side cosmetic function. On a dedicated server, it does nothing.
  • Shake intensity is scaled by distance but not by whether line-of-sight to the epicenter is clear — players behind thick walls will still shake.
  • You must create a UCameraShakeBase subclass (or use a PerlinNoise/Legacy shake asset) and pass its class; passing nullptr will silently do nothing.

Signature

static ENGINE_API void PlayWorldCameraShake(const UObject* WorldContextObject, TSubclassOf<class UCameraShakeBase> Shake, FVector Epicenter, float InnerRadius, float OuterRadius, float Falloff = 1.f, bool bOrientShakeTowardsEpicenter = false);

Parameters

Name Type Description Default
WorldContextObject const UObject* Object used to retrieve the world context.
Shake TSubclassOf<class UCameraShakeBase> Camera shake asset class to play.
Epicenter FVector World-space location of the shake's origin.
InnerRadius float Distance within which the shake plays at full intensity.
OuterRadius float Distance beyond which no shake is applied.
Falloff float Exponent controlling intensity falloff between inner and outer radius. 1.f
bOrientShakeTowardsEpicenter bool If true, rotates the shake so it points toward the epicenter. false

Return Type

void

Example

Play explosion screen shake C++
UGameplayStatics::PlayWorldCameraShake(
    this,
    ExplosionShakeClass,
    ExplosionLocation,
    200.f,   // InnerRadius — full shake
    1000.f,  // OuterRadius — shake fades out here
    1.5f     // Falloff exponent
);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.