UCameraModifier_CameraShake

A [UCameraModifier_CameraShake](API\Runtime\Engine\Camera\UCameraModifier_CameraShake) is a camera modifier that can apply a [UCameraShakeBase](API\Runtime\Engine\Camera\UCameraShakeBase) to the owning camera.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Camera/CameraModifier_CameraShake.h

Include

#include "Camera/CameraModifier_CameraShake.h"

Syntax

class UCameraModifier_CameraShake : public UCameraModifier

Remarks

A UCameraModifier_CameraShake is a camera modifier that can apply a UCameraShakeBase to the owning camera.

Variables

Name Description

Protected variable

TArray< FActive...

 

ActiveShakes

List of active CameraShake instances

Protected variable

TMap< TSubclass...

 

ExpiredPooledShakesMap

Protected variable

float

 

SplitScreenShakeScale

Scaling factor applied to all camera shakes in when in splitscreen mode.

Constructors

Name Description

Public function

UCameraModifier_CameraShake

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual

UCameraShake...

 

AddCameraShake

(
    TSubclassOf< UCameraShakeBase > New...,
    const FAddCameraShakeParams& Param...
)

Adds a new active screen shake to be applied.

Public function Virtual Const

void

 

GetActiveCameraShakes

(
    TArray< FActiveCameraShakeInfo >& ...
)

Returns a list of currently active camera shakes.

Protected function

UCameraShake...

 

ReclaimShakeFromExpiredPool

(
    TSubclassOf< UCameraShakeBase > Cam...
)

Public function Virtual

void

 

RemoveAllCameraShakes

(
    bool bImmediately
)

Stops and removes all camera shakes from the camera.

Public function Virtual

void

 

RemoveAllCameraShakesFromSource

(
    const UCameraShakeSourceComponent&...,
    bool bImmediately
)

Stops and removes all camera shakes originating from the given source.

Public function Virtual

void

 

RemoveAllCameraShakesOfClass

(
    TSubclassOf< UCameraShakeBase > Sha...,
    bool bImmediately
)

Stops and removes all camera shakes of the given class from the camera.

Public function Virtual

void

 

RemoveAllCameraShakesOfClassFromSource

(
    TSubclassOf< UCameraShakeBase > Sha...,
    const UCameraShakeSourceComponent&...,
    bool bImmediately
)

Stops and removes all camera shakes of the given class originating from the given source.

Public function Virtual

void

 

RemoveCameraShake

(
    UCameraShakeBase* ShakeInst,
    bool bImmediately
)

Stops and removes the camera shake of the given class from the camera.

Protected function

void

 

SaveShakeInExpiredPool

(
    UCameraShakeBase* ShakeInst
)

Protected function

void

 

SaveShakeInExpiredPoolIfPossible

(
    const FActiveCameraShakeInfo& Shak...
)

Overridden from UCameraModifier

Name Description

Public function Virtual

void

 

DisplayDebug

(
    UCanvas* Canvas,
    const FDebugDisplayInfo& DebugDisp...,
    float& YL,
    float& YPos
)

Allows camera modifiers to output debug text during "showdebug camera"

Public function Virtual

bool

 

ModifyCamera

(
    float DeltaTime,
    FMinimalViewInfo& InOutPOV
)

Directly modifies variables in the owning camera

Deprecated Functions

Name Description

Public function Virtual

UCameraShake...

 

AddCameraShake

(
    TSubclassOf< UCameraShakeBase > New...,
    float Scale,
    ECameraShakePlaySpace PlaySpace,
    FRotator UserPlaySpaceRot
)

Please use the new AddCameraShake method that takes a parameter struct.