UCameraShakeBase

Base class for a camera shake.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "Camera/CameraShakeBase.h"

Syntax

class UCameraShakeBase : public UObject

Remarks

Base class for a camera shake. A camera shake contains a root shake "pattern" which is the object that contains the actual logic driving how the camera is shaken. Keeping the two separate makes it possible to completely change how a shake works without having to create a completely different asset.

Variables

Name Description

Public variable

bool

 

bSingleInstance

If true to only allow a single instance of this shake class to play at any given time.

Public variable

float

 

ShakeScale

The overall scale to apply to the shake. Only valid when the shake is active.

Constructors

Name Description

Public function

UCameraShakeBase

(
    const FObjectInitializer& ObjectIn...
)

Create a new instance of a camera shake

Functions

Name Description

Public function Static

void

 

ApplyLimits

(
    const FMinimalViewInfo& InPOV,
    FCameraShakeUpdateResult& InOutRes...
)

Applies any appropriate system-wide limits

Public function Static

void

 

ApplyPlaySpace

(
    ECameraShakePlaySpace PlaySpace,
    FMatrix UserPlaySpaceMatrix,
    const FMinimalViewInfo& InPOV,
    FCameraShakeUpdateResult& InOutRes...
)

Modifies the current shake offset to be oriented in the current shake's play space (only if the result is "relative")

Protected function Const

void

 

ApplyPlaySpace

(
    const FCameraShakeUpdateParams& Pa...,
    FCameraShakeUpdateResult& InOutRes...
)

Modifies the current shake offset to be oriented in the current shake's play space (only if the result is "relative")

Public function Static

void

 

ApplyResult

(
    const FCameraShakeApplyResultParams...,
    const FCameraShakeUpdateResult& In...,
    FMinimalViewInfo& InOutPOV
)

Uses the given result parameters to apply the given result to the given input view info

Protected function Const

void

 

ApplyScale

(
    const FCameraShakeUpdateParams& Pa...,
    FCameraShakeUpdateResult& InOutRes...
)

Applies all the appropriate auto-scaling to the current shake offset (only if the result is "relative")

Public function Static

void

 

ApplyScale

(
    float Scale,
    FCameraShakeUpdateResult& InOutRes...
)

Applies the given scale to the current shake offset (only if the result is "relative")

Public function

ShakePattern...

 

ChangeRootShakePattern()

Creates a new pattern of the given type and sets it as the root one on this shake

Public function Const

APlayerCamer...

 

GetCameraManager()

Gets the current camera manager. Will be null if the shake isn't active.

Public function Static

bool

 

GetCameraShakeBlendTimes

(
    TSubclassOf< UCameraShakeBase > Cam...,
    float& OutBlendIn,
    float& OutBlendOut
)

Gets the default blend in/out durations for camera shakes of the given class.

Public function Const

void

 

GetCameraShakeBlendTimes

(
    float& OutBlendIn,
    float& OutBlendOut
)

Gets the duration of this camera shake's blend in and out.

Public function Const

FCameraShake...

 

GetCameraShakeDuration()

Gets the duration of this camera shake in seconds.

Public function Static

bool

 

GetCameraShakeDuration

(
    TSubclassOf< UCameraShakeBase > Cam...,
    FCameraShakeDuration& OutDuration
)

Gets the default duration for camera shakes of the given class.

Public function Const

ECameraShake...

 

GetPlaySpace()

Returns the current play space. The value is irrelevant if the shake isn't active.

Public function Const

UCameraShake...

 

GetRootShakePattern()

Gets the root pattern of this camera shake

Public function Const

void

 

GetShakeInfo

(
    FCameraShakeInfo& OutInfo
)

Gets some infromation about this specific camera shake

Public function Const

const FMatri...

 

GetUserPlaySpaceMatrix()

Returns the current play space matrix.

Public function Const

bool

 

IsActive()

Returns whether this shake is active.

Public function Const

bool

 

IsFinished()

Returns whether this camera shake is finished

Public function

void

 

ScrubAndApplyCameraShake

(
    float AbsoluteTime,
    float Alpha,
    FMinimalViewInfo& InOutPOV
)

Scrubs this camera shake to the given time and applies its effect to the given view

Public function

void

 

SetRootShakePattern

(
    UCameraShakePattern* InPattern
)

Sets the root pattern of this camera shake

Public function

void

 

SetUserPlaySpaceMatrix

(
    const FMatrix& InMatrix
)

Sets the current play space matrix.

Public function

void

 

StartShake

(
    APlayerCameraManager* Camera,
    float Scale,
    ECameraShakePlaySpace InPlaySpace,
    FRotator UserPlaySpaceRot
)

Starts this camera shake with the given parameters

Public function

void

 

StopShake

(
    bool bImmediately
)

Stops this camera shake

Public function

void

 

TeardownShake()

Tears down this camera shake before destruction or recycling

Public function

void

 

UpdateAndApplyCameraShake

(
    float DeltaTime,
    float Alpha,
    FMinimalViewInfo& InOutPOV
)

Updates this camera shake and applies its effect to the given view

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss