ADebugCameraController

Camera controller that allows you to fly around a level mostly unrestricted by normal movement rules.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/DebugCameraController.h

Include

#include "Engine/DebugCameraController.h"

Syntax

class ADebugCameraController : public APlayerController

Remarks

Camera controller that allows you to fly around a level mostly unrestricted by normal movement rules.

To turn it on, please press Alt+C or both (left and right) analogs on XBox pad, or use the "ToggleDebugCamera" console command. Check the debug camera bindings in DefaultPawn.cpp for the camera controls.

Variables

Name Description

Public variable

uint32: 1

 

bEnableBufferVisualization

Whether set view mode to display GBuffer visualization overview

Public variable

uint32: 1

 

bEnableBufferVisualizationFullMode

Whether set view mode to display GBuffer visualization full

Public variable

uint32: 1

 

bIsBufferVisualizationInputSetup

Whether GBuffer visualization overview inputs are set up

Public variable

uint32: 1

 

bIsFrozenRendering

Saves whether the FreezeRendering console command is active

Public variable

uint32: 1

 

bIsOrbitingSelectedActor

Whether to orbit selected actor.

Public variable

uint32: 1

 

bLastDisplayEnabled

Last display enabled setting before toggling buffer visualization overview

Public variable

uint32: 1

 

bOrbitPivotUseCenter

When orbiting, true if using actor center as pivot, false if using last selected hitpoint

Public variable

uint32: 1

 

bShowSelectedInfo

Whether to show information about the selected actor on the debug camera HUD.

Public variable

UDrawFrustumCom...

 

DrawFrustum

Visualizes the frustum of the camera

Public variable

float

 

InitialAccel

Initial acceleration of the spectator pawn when we start possession.

Public variable

float

 

InitialDecel

Initial deceleration of the spectator pawn when we start possession.

Public variable

float

 

InitialMaxSpeed

Initial max speed of the spectator pawn when we start possession.

Public variable

APlayerControll...

 

OriginalControllerRef

Controller that was active before this was spawned

Public variable

UPlayer *

 

OriginalPlayer

Player object that was active before this was spawned

Public variable

AActor *

 

SelectedActor

Currently selected actor, may be invalid

Public variable

UPrimitiveCompo...

 

SelectedComponent

Currently selected component, may be invalid

Public variable

FHitResult

 

SelectedHitPoint

Selected hit point

Public variable

float

 

SpeedScale

Allows control over the speed of the spectator pawn.

Constructors

Name Description

Public function

ADebugCameraController

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function Virtual

void

 

ApplySpeedScale()

Adjusts movement speed limits based on SpeedScale.

Public function

void

 

BufferVisualizationMoveDown()

Buffer overview move down

Public function

void

 

BufferVisualizationMoveLeft()

Buffer overview move left

Public function

void

 

BufferVisualizationMoveRight()

Buffer overview move right

Public function

void

 

BufferVisualizationMoveUp()

Buffer overview move up

Public function

void

 

ConsumeAxisMotion

(
    float Val
)

Ignores axis motion

Public function

void

 

CycleViewMode()

Cycle view mode

Public function

void

 

DecreaseCameraSpeed()

Slows down camera movement

Public function

void

 

DecreaseFOV()

Decreases camera field of vision

Public function Static

bool

 

EnableDebugBuffers()

Whether buffer visualization option should be enabled

Public function Static

bool

 

EnableDebugViewmodes()

Whether cycle viewmode option should be enabled

Public function

FString

 

GetBufferMaterialName

(
    const FString& InBuffer
)

Get visualization buffer's material name used by post processing settings

Protected function

TArray< FStr...

 

GetBufferVisualizationOverviewTargets()

Get buffer visualization overview targets based on console var

Protected function

void

 

GetNextBuffer

(
    int32 Step
)

Get next buffer

Protected function

void

 

GetNextBuffer

(
    const TArray< FString >& OverviewB...,
    int32 Step
)

Get next buffer

Public function Const

bool

 

GetPivotForOrbit

(
    FVector& PivotLocation
)

Gets pivot to use when orbiting

Public function Const

AActor *

 

GetSelectedActor()

Returns the currently selected actor, or null if it is invalid or not set

Public function

FString

 

GetSelectedBufferMaterialName()

Get current visualization buffer's material name

Public function

void

 

IncreaseCameraSpeed()

Speeds up camera movement

Public function

void

 

IncreaseFOV()

Increases camera field of vision

Public function

bool

 

IsDisplayEnabled()

Returns whether debug info display is enabled

Public function Virtual

void

 

OnActivate

(
    APlayerController* OriginalPC
)

Function called on activation debug camera controller

Public function Virtual

void

 

OnDeactivate

(
    APlayerController* RestoredPC
)

Function called on deactivation debug camera controller

Public function

void

 

PreProcessInputForOrbit

(
    const float DeltaTime,
    const bool bGamePaused
)

Pre process input when orbiting

Public function

void

 

ReceiveOnActivate

(
    APlayerController* OriginalPC
)

Function called on activation of debug camera controller.

Protected function

void

 

ReceiveOnActorSelected

(
    AActor* NewSelectedActor,
    const FVector& SelectHitLocation,
    const FVector& SelectHitNormal,
    const FHitResult& Hit
)

Called when an actor has been selected with the primary key (e.g. left mouse button).

Public function

void

 

ReceiveOnDeactivate

(
    APlayerController* RestoredPC
)

Function called on deactivation of debug camera controller.

Protected function Virtual

void

 

Select

(
    FHitResult const& Hit
)

Called when an actor has been selected with the primary key (e.g. left mouse button).

Public function

void

 

SelectTargetedObject()

Selects the object the camera is aiming at.

Public function

void

 

SetBufferVisualizationFullMode

(
    bool bFullMode
)

Set buffer visualization full mode

Public function

void

 

SetDisplay

(
    bool bEnabled
)

Sets display of debug info and input commands.

Public function

void

 

SetPawnMovementSpeedScale

(
    float NewSpeedScale
)

Sets the pawn movement speed scale.

Protected function

void

 

SetupBufferVisualizationOverviewInput()

Sets up or clears input for buffer visualization overview

Public function Virtual

void

 

ShowDebugSelectedInfo()

Sets whether to show information about the selected actor on the debug camera HUD.t

Public function

void

 

ToggleBufferVisualizationFullMode()

Toggle buffer visualization full display

Public function

void

 

ToggleBufferVisualizationOverviewMode()

Toggle buffer visualization overview

Public function

void

 

ToggleDisplay()

Toggles the display of debug info and input commands for the Debug Camera.

Public function Virtual

void

 

ToggleFreezeRendering()

Function called from key bindings command to save information about turning on/off FreezeRendering command.

Public function

void

 

ToggleOrbit

(
    bool bOrbitCenter
)

Toggles camera orbit

Public function

void

 

ToggleOrbitCenter()

Toggles camera orbit center

Public function

void

 

ToggleOrbitHitPoint()

Toggles camera orbit hitpoint

Public function

void

 

Unselect()

Called when the user pressed the deselect key, just before the selected actor is cleared.

Public function

void

 

UpdateRotationForOrbit

(
    float DeltaTime
)

Updates the rotation and location of player when orbiting

Public function

void

 

UpdateVisualizeBufferPostProcessing

(
    FFinalPostProcessSettings& InOutPo...
)

Update visualize buffer post processing settings

Overridden from APlayerController

Name Description

Public function Virtual

void

 

AddCheats

(
    bool bForce
)

Notifies the server that the client has ticked gameplay code, and should no longer get the extended "still loading" timeout grace period

Public function Virtual

FString

 

ConsoleCommand

(
    const FString& Command,
    bool bWriteToLog
)

Executes the Exec() command on the UPlayer object

Public function Virtual

void

 

EndSpectatingState()

Event when no longer spectating.

Public function Virtual

void

 

PreProcessInput

(
    const float DeltaTime,
    const bool bGamePaused
)

Method called prior to processing input

Protected function Virtual

void

 

SetSpectatorPawn

(
    ASpectatorPawn* NewSpectatorPa...
)

Set the spectator pawn.

Protected function Virtual

void

 

SetupInputComponent()

Allows the PlayerController to set up custom input bindings.

Public function Virtual

ASpectatorPa...

 

SpawnSpectatorPawn()

Custom spawn to spawn a default SpectatorPawn, to use as a spectator and initialize it.

Public function Virtual

void

 

UpdateHiddenComponents

(
    const FVector& ViewLocation,
    TSet< FPrimitiveComponentId >& Hid...
)

Builds a list of components that are hidden based upon gameplay

Public function Virtual

void

 

UpdateRotation

(
    float DeltaTime
)

Updates the rotation of player, based on ControlRotation after RotationInput has been applied.

Overridden from AActor

Name Description

Public function Virtual

void

 

PostInitializeComponents()

Overridden to create the player replication info and perform other mundane initialization tasks.

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