UCameraModifier

A CameraModifier is a base class for objects that may adjust the final camera properties after being computed by the [APlayerCameraManager](API\Runtime\Engine\Camera\APlayerCameraManager) (

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "Camera/CameraModifier.h"

Syntax

class UCameraModifier : public UObject

Remarks

A CameraModifier is a base class for objects that may adjust the final camera properties after being computed by the APlayerCameraManager (

Variables

Name Description

Protected variable

float

 

Alpha

Current blend alpha.

Protected variable

float

 

AlphaInTime

When blending in, alpha proceeds from 0 to 1 over this time

Protected variable

float

 

AlphaOutTime

When blending out, alpha proceeds from 1 to 0 over this time

Public variable

uint32: 1

 

bDebug

If true, enables certain debug visualization features.

Protected variable

uint32: 1

 

bDisabled

If true, do not apply this modifier to the camera.

Public variable

uint32: 1

 

bExclusive

If true, no other modifiers of same priority allowed.

Protected variable

uint32: 1

 

bPendingDisable

If true, this modifier will disable itself when finished interpolating out.

Protected variable

TObjectPtr< cla...

 

CameraOwner

Camera this object is associated with.

Public variable

uint8

 

Priority

Priority value that determines the order in which modifiers are applied.

Constructors

Name Description

Public function

UCameraModifier

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual

void

 

AddedToCamera

(
    APlayerCameraManager* Camera
)

Allows any custom initialization. Called immediately after creation.

Public function

void

 

BlueprintModifyCamera

(
    float DeltaTime,
    FVector ViewLocation,
    FRotator ViewRotation,
    float FOV,
    FVector& NewViewLocation,
    FRotator& NewViewRotation,
    float& NewFOV
)

Called per tick that the modifier is active to allow Blueprinted modifiers to modify the camera's transform.

Public function

void

 

BlueprintModifyPostProcess

(
    float DeltaTime,
    float& PostProcessBlendWeight,
    FPostProcessSettings& PostProcessS...
)

Called per tick that the modifier is active to allow Blueprinted modifiers to modify the camera's postprocess effects.

Public function Virtual

void

 

DisableModifier

(
    bool bImmediate
)

Disables this modifier.

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

void

 

EnableModifier()

Enables this modifier.

Protected function Virtual

float

 

GetTargetAlpha()

Public function Virtual Const

AActor *

 

GetViewTarget()

Public function Const

UWorld *

 

GetWorld()

Public function Virtual Const

bool

 

IsDisabled()

Public function Virtual

bool

 

ModifyCamera

(
    float DeltaTime,
    FMinimalViewInfo& InOutPOV
)

Directly modifies variables in the owning camera

Protected function Virtual

void

 

ModifyCamera

(
    float DeltaTime,
    FVector ViewLocation,
    FRotator ViewRotation,
    float FOV,
    FVector& NewViewLocation,
    FRotator& NewViewRotation,
    float& NewFOV
)

Allows modifying the camera in native code.

Protected function Virtual

void

 

ModifyPostProcess

(
    float DeltaTime,
    float& PostProcessBlendWeight,
    FPostProcessSettings& PostProcessS...
)

Allows modifying the post process in native code.

Protected function

void

 

OnCameraOwnerDestroyed

(
    AActor* InOwner
)

Public function Virtual

bool

 

ProcessViewRotation

(
    AActor* ViewTarget,
    float DeltaTime,
    FRotator& OutViewRotation,
    FRotator& OutDeltaRot
)

Called to give modifiers a chance to adjust view rotation updates before they are applied.

Public function Virtual

void

 

ToggleModifier()

Toggled disabled/enabled state of this modifier.

Public function Virtual

void

 

UpdateAlpha

(
    float DeltaTime
)

Responsible for updating alpha blend value.

See Also

ModifyCamera). A CameraModifier can be stateful

and is associated uniquely with a specific APlayerCameraManager.