AVirtualCameraPawnBase

A class to handle aspects of virtual Camera related to general settings, and communicating with components.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

VirtualCamera

Header

/Engine/Plugins/Experimental/VirtualCamera/Source/VirtualCamera/Public/VirtualCameraPawnBase.h

Include

#include "VirtualCameraPawnBase.h"

Syntax

UCLASS(Abstract, Blueprintable, BlueprintType,
       HideCategories=("Pawn", "Camera", "Rendering", "Replication", "Input", "Actor", "HLOD"))
class AVirtualCameraPawnBase :
    public APawn,
    public IVirtualCameraPresetContainer,
    public IVirtualCameraOptions

Remarks

A class to handle aspects of virtual Camera related to general settings, and communicating with components.

Variables

Name Description

Protected variable UProperty Category BlueprintReadOnly

bool

 

bAllowFocusVisualization

Should focus plane be shown on all touch focus events

Public variable UProperty Category, EditAnywhere

bool

 

bSaveSettingsWhenClosing

Determines if values should be saved between sessions

Public variable UProperty Category BlueprintReadWrite visibleanywhere

UVirtualCameraC...

 

CineCamera

Cinematic camera used for view

Public variable

USceneComponent...

 

DefaultSceneRoot

Root component

Protected variable

EUnit

 

DesiredDistanceUnits

The desired unit in which to display focus distance

Protected variable

FString

 

HomeWaypointName

Tracks which waypoint is the "home" waypoint, defaults to first value

Protected variable

uint32

 

MinimumIntegralDigits

Number formatter for Screenshots, Waypoints and Presets.

Public variable

UVirtualCameraM...

 

MovementComponent

Movement Component to handle the motion input for the camera

Public variable UProperty Category, EditAnywhere

FString

 

SavedSettingsSlotName

Stores the name of the save slot being used currently

Protected variable

TMap< FString, ...

 

Screenshots

Stores the locations of any screenshots that were taken

Public variable UProperty Category, EditAnywhere

TMap< FString, ...

 

SettingsPresets

Stores the list of settings presets, and saved presets

Protected variable

TMap< FString, ...

 

Waypoints

Tracks any waypoints the player has saved for teleporting

Constructors

Name Description

Public function

AVirtualCameraPawnBase

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

int32

 

DeletePreset

(
    const FString& PresetName
)

Deletes a preset using its name as the key.

Protected function Virtual

int32

 

DeletePreset_Implementation

(
    const FString& PresetName
)

Public function

int32

 

DeleteScreenshot

(
    const FString& ScreenshotName
)

Deletes a screenshot, using its name as the key.

Public function

int32

 

DeleteWaypoint

(
    const FString& WaypointName
)

Deletes a waypoint, using its name as the key.

Public function Const

EUnit

 

GetDesiredDistanceUnits()

Set the matte aspect ratio to a new value.

Protected function Virtual

EUnit

 

GetDesiredDistanceUnits_Implementation()

Public function Const

bool

 

GetSaveSettingsWhenClosing()

Gets whether settings should save when closing.

Public function Const

void

 

GetScreenshotInfo

(
    const FString ScreenshotName,
    FVirtualCameraScreenshot& OutScree...
)

Returns the information associated with a Screenshot.

Public function Const

void

 

GetScreenshotNames

(
    TArray< FString >& OutArray
)

Collects a list of existing screenshot names into an out array.

Public function

TMap< FStrin...

 

GetSettingsPresets()

Returns a sorted TMap of the current presets.

Protected function Virtual

TMap< FStrin...

 

GetSettingsPresets_Implementation()

Public function Const

void

 

GetWaypointInfo

(
    const FString WaypointName,
    FVirtualCameraWaypoint& OutWaypoin...
)

Returns the information associated with a waypoint.

Public function Const

void

 

GetWaypointNames

(
    TArray< FString >& OutArray
)

Collects a list of existing waypoint names into an out array.

Public function UFunction BlueprintImplementableEvent

void

 

HighlightTappedActor

(
    AActor* HighlightedActor
)

Blueprint event to trigger the highlighting of a specific actor.

Public function Const

bool

 

IsAutoFocusEnabled()

Check to see if the camera is in autofocus mode.

Public function Const

bool

 

IsFocusVisualizationAllowed()

Checks whether or not focus visualization can activate

Protected function Virtual

bool

 

IsFocusVisualizationAllowed_Implementation()

Protected function Const

FString

 

LeftPadWithZeros

(
    int32 InNumber,
    int32 MinNumberOfCharacters
)

Convenience function to leftpad numbers with zeros

Public function UFunction BlueprintImplementableEvent

void

 

LoadFinished()

Blueprint event for signaling UI that game settings have been loaded.

Public function

bool

 

LoadPreset

(
    const FString& PresetName
)

Loads a preset using its name as a string key.

Protected function Virtual

bool

 

LoadPreset_Implementation

(
    const FString& PresetName
)

Public function

bool

 

LoadScreenshotView

(
    const FString& ScreenshotIndex
)

Moves a camera to the location where a screenshot was taken and restores camera settings used for that screenshot.

Protected function

void

 

LoadSettings()

Loads camera settings from a saved file.

Public function

void

 

ProcessMovementInput

(
    const FVector& Location,
    const FRotator& Rotation
)

Send any movement input data forward to the Movement Component.

Public function

bool

 

RenameScreenshotLocation

(
    const FString& TargetWaypoint,
    const FString& NewWaypointName
)

Change the name of a waypoint to a different name.

Public function

bool

 

RenameWaypoint

(
    const FString& TargetWaypoint,
    const FString& NewWaypointName
)

Change the name of a waypoint to a different name.

Public function

void

 

SaveHomeWaypoint

(
    const FString& NewHomeWaypointName
)

Stores the new home location.

Public function

FString

 

SavePreset

(
    const bool bSaveCameraSettings,
    const bool bSaveStabilization,
    const bool bSaveAxisLocking,
    const bool bSaveMotionScale
)

Saves a preset into the list of presets.

Protected function Virtual

FString

 

SavePreset_Implementation

(
    const bool bSaveCameraSettings,
    const bool bSaveStabilization,
    const bool bSaveAxisLocking,
    const bool bSaveMotionScale
)

Protected function

void

 

SaveSettings()

Stores the current camera settings to a save file for later use.

Public function

FString

 

SaveWaypoint()

Stores the current pawn location as a waypoint.

Public function

void

 

SetAllowFocusPlaneVisualization

(
    bool bShouldAllowFocusVisualization
)

Sets whether or not focus visualization can activate

Public function

void

 

SetDesiredDistanceUnits

(
    const EUnit DesiredUnits
)

Set the matte aspect ratio to a new value.

Protected function Virtual

void

 

SetDesiredDistanceUnits_Implementation

(
    const EUnit DesiredUnits
)

Public function

void

 

SetFocusDistance

(
    const float NewFocusDistance
)

Forwards any focus change commands from outside sources to the camera component.

Public function

void

 

SetPresetFavoriteStatus

(
    const FString& PresetName,
    const bool bIsFavorite
)

Sets whether or not a preset is favorited

Public function

void

 

SetSaveSettingsWhenClosing

(
    const bool bShouldSettingsSave
)

Sets whether settings should be saved on exit.

Public function

void

 

SetScreenshotFavoriteStatus

(
    const FString& ScreenshotName,
    const bool bIsFavorite
)

Sets whether or not a screenshot is favorited

Public function

void

 

SetTrackedActorForFocus

(
    AActor* ActorToTrack,
    FVector TrackingPointOffset
)

Forwards tracked actor changes to the camera component to be handled.

Public function

void

 

SetWaypointFavoriteStatus

(
    const FString& WaypointName,
    const bool bIsFavorite
)

Sets whether or not a waypoint is favorited

Public function

FString

 

TakeScreenshot()

Takes a screenshot from the current view and saves the location and camera settings.

Public function

bool

 

TeleportToHomeWaypoint()

Teleports the pawn to the current marked home waypoint.

Public function

bool

 

TeleportToWaypoint

(
    const FString& WaypointName
)

Teleports the pawn to a location associated with the specified waypoint.

Public function UFunction BlueprintImplementableEvent

void

 

TriggerFocusPlaneTimer()

Blueprint event to trigger focus plane visualization for a set amount of time.

Public function

void

 

UpdateSettingsFromPreset

Updates the current settings to reflect those in the preset.

Overridden from AActor

Name Description

Public function Virtual

void

 

BeginPlay()

Overridable native event for when play begins for this actor.

Public function Virtual

void

 

EndPlay

(
    const EEndPlayReason::Type EndPlayR...
)

Overridable function called whenever this actor is being removed from a level

Constants

Name

Description

PresetIndex

The next preset number

ScreenshotIndex

The next screenshot number

WaypointIndex

The next waypoint number