Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | ADebugCameraController |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/DebugCameraController.h |
| Include Path | #include "Engine/DebugCameraController.h" |
Syntax
UCLASS (Config=Game, MinimalAPI)
class ADebugCameraController : public APlayerController
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → AController → APlayerController → ADebugCameraController
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ADebugCameraController
(
const FObjectInitializer& ObjectInitializer |
Engine/DebugCameraController.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bEnableBufferVisualization | uint32 | Whether set view mode to display GBuffer visualization overview | Engine/DebugCameraController.h | |
| bEnableBufferVisualizationFullMode | uint32 | Whether set view mode to display GBuffer visualization full | Engine/DebugCameraController.h | |
| bIsBufferVisualizationInputSetup | uint32 | Whether GBuffer visualization overview inputs are set up | Engine/DebugCameraController.h | |
| bIsFrozenRendering | uint32 | Saves whether the FreezeRendering console command is active | Engine/DebugCameraController.h | |
| bIsOrbitingSelectedActor | uint32 | Whether to orbit selected actor. | Engine/DebugCameraController.h | |
| bLastDisplayEnabled | uint32 | Last display enabled setting before toggling buffer visualization overview | Engine/DebugCameraController.h | |
| bOrbitPivotUseCenter | uint32 | When orbiting, true if using actor center as pivot, false if using last selected hitpoint | Engine/DebugCameraController.h | |
| bShowSelectedInfo | uint32 | Whether to show information about the selected actor on the debug camera HUD. | Engine/DebugCameraController.h |
|
| DrawFrustum | TObjectPtr< class UDrawFrustumComponent > | Visualizes the frustum of the camera | Engine/DebugCameraController.h | |
| InitialAccel | float | Initial acceleration of the spectator pawn when we start possession. | Engine/DebugCameraController.h |
|
| InitialDecel | float | Initial deceleration of the spectator pawn when we start possession. | Engine/DebugCameraController.h |
|
| InitialMaxSpeed | float | Initial max speed of the spectator pawn when we start possession. | Engine/DebugCameraController.h |
|
| OriginalControllerRef | TObjectPtr< class APlayerController > | Controller that was active before this was spawned | Engine/DebugCameraController.h | |
| OriginalPlayer | TObjectPtr< class UPlayer > | Player object that was active before this was spawned | Engine/DebugCameraController.h | |
| SelectedActor | TWeakObjectPtr< class AActor > | Currently selected actor, may be invalid | Engine/DebugCameraController.h | |
| SelectedComponent | TWeakObjectPtr< class UPrimitiveComponent > | Currently selected component, may be invalid | Engine/DebugCameraController.h | |
| SelectedHitPoint | FHitResult | Selected hit point | Engine/DebugCameraController.h | |
| SpeedScale | float | Allows control over the speed of the spectator pawn. | Engine/DebugCameraController.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CurrSelectedBuffer | FString | Buffer selected in buffer visualization overview or full screen view | Engine/DebugCameraController.h | |
| LastOrbitPawnLocation | FVector | Last position for orbit | Engine/DebugCameraController.h | |
| LastTouchDragLocation | FVector2D | The normalized screen location when a drag starts | Engine/DebugCameraController.h | |
| LastViewModeSettingsIndex | int32 | Last index in settings array for cycle view modes | Engine/DebugCameraController.h | |
| OrbitPivot | FVector | Current orbit pivot, if orbit is enabled | Engine/DebugCameraController.h | |
| OrbitRadius | float | Current orbit radius, if orbit is enabled | Engine/DebugCameraController.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BufferVisualizationMoveDown() |
Buffer overview move down | Engine/DebugCameraController.h | |
void BufferVisualizationMoveLeft() |
Buffer overview move left | Engine/DebugCameraController.h | |
void BufferVisualizationMoveRight() |
Buffer overview move right | Engine/DebugCameraController.h | |
void BufferVisualizationMoveUp() |
Buffer overview move up | Engine/DebugCameraController.h | |
void ConsumeAxisMotion
(
float Val |
Ignores axis motion | Engine/DebugCameraController.h | |
void CycleViewMode() |
Cycle view mode | Engine/DebugCameraController.h | |
void DecreaseCameraSpeed() |
Slows down camera movement | Engine/DebugCameraController.h | |
void DecreaseFOV() |
Decreases camera field of vision | Engine/DebugCameraController.h | |
| Get visualization buffer's material name used by post processing settings | Engine/DebugCameraController.h | ||
bool GetPivotForOrbit
(
FVector& PivotLocation |
Gets pivot to use when orbiting | Engine/DebugCameraController.h | |
AActor * GetSelectedActor() |
Returns the currently selected actor, or null if it is invalid or not set | Engine/DebugCameraController.h |
|
FString GetSelectedBufferMaterialName() |
Get current visualization buffer's material name | Engine/DebugCameraController.h | |
void IncreaseCameraSpeed() |
Speeds up camera movement | Engine/DebugCameraController.h | |
void IncreaseFOV() |
Increases camera field of vision | Engine/DebugCameraController.h | |
bool IsDisplayEnabled() |
Returns whether debug info display is enabled | Engine/DebugCameraController.h | |
virtual void OnActivate
(
APlayerController* OriginalPC |
Function called on activation debug camera controller | Engine/DebugCameraController.h | |
virtual void OnDeactivate
(
APlayerController* RestoredPC |
Function called on deactivation debug camera controller | Engine/DebugCameraController.h | |
void PreProcessInputForOrbit
(
const float DeltaTime, |
Pre process input when orbiting | Engine/DebugCameraController.h | |
void ReceiveOnActivate
(
APlayerController* OriginalPC |
Function called on activation of debug camera controller. | Engine/DebugCameraController.h |
|
void ReceiveOnDeactivate
(
APlayerController* RestoredPC |
Function called on deactivation of debug camera controller. | Engine/DebugCameraController.h |
|
void SelectTargetedObject() |
Selects the object the camera is aiming at. | Engine/DebugCameraController.h | |
void SetBufferVisualizationFullMode
(
bool bFullMode |
Set buffer visualization full mode | Engine/DebugCameraController.h | |
void SetDisplay
(
bool bEnabled |
Sets display of debug info and input commands. | Engine/DebugCameraController.h | |
void SetPawnMovementSpeedScale
(
float NewSpeedScale |
Sets the pawn movement speed scale. | Engine/DebugCameraController.h |
|
virtual void ShowDebugSelectedInfo() |
Sets whether to show information about the selected actor on the debug camera HUD. | Engine/DebugCameraController.h |
|
void ToggleBufferVisualizationFullMode() |
Toggle buffer visualization full display | Engine/DebugCameraController.h | |
void ToggleBufferVisualizationOverviewMode() |
Toggle buffer visualization overview | Engine/DebugCameraController.h | |
void ToggleDisplay() |
Toggles the display of debug info and input commands for the Debug Camera. | Engine/DebugCameraController.h |
|
virtual void ToggleFreezeRendering() |
Function called from key bindings command to save information about turning on/off FreezeRendering command. | Engine/DebugCameraController.h | |
void ToggleOrbit
(
bool bOrbitCenter |
Toggles camera orbit | Engine/DebugCameraController.h | |
void ToggleOrbitCenter() |
Toggles camera orbit center | Engine/DebugCameraController.h | |
void ToggleOrbitHitPoint() |
Toggles camera orbit hitpoint | Engine/DebugCameraController.h | |
void Unselect() |
Called when the user pressed the deselect key, just before the selected actor is cleared. | Engine/DebugCameraController.h | |
void UpdateRotationForOrbit
(
float DeltaTime |
Updates the rotation and location of player when orbiting | Engine/DebugCameraController.h | |
void UpdateVisualizeBufferPostProcessing
(
FFinalPostProcessSettings& InOutPostProcessingSettings |
Update visualize buffer post processing settings | Engine/DebugCameraController.h |
Overridden from APlayerController
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddCheats
(
bool bForce |
Called to try and enable cheats for this player, happens during initialization or from AllowCheats command | Engine/DebugCameraController.h | |
| Executes the Exec() command on the UPlayer object | Engine/DebugCameraController.h | ||
virtual void EndSpectatingState() |
Event when no longer spectating. | Engine/DebugCameraController.h | |
virtual void PreProcessInput
(
const float DeltaTime, |
Method called prior to processing input | Engine/DebugCameraController.h | |
virtual ASpectatorPawn * SpawnSpectatorPawn () |
Custom spawn to spawn a default SpectatorPawn, to use as a spectator and initialize it. | Engine/DebugCameraController.h | |
virtual void UpdateHiddenComponents
(
const FVector& ViewLocation, |
Builds a list of components that are hidden based upon gameplay | Engine/DebugCameraController.h | |
virtual void UpdateRotation
(
float DeltaTime |
Updates the rotation of player, based on ControlRotation after RotationInput has been applied. | Engine/DebugCameraController.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostInitializeComponents() |
Overridden to create the player replication info and perform other mundane initialization tasks. | Engine/DebugCameraController.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplySpeedScale() |
Adjusts movement speed limits based on SpeedScale. | Engine/DebugCameraController.h | |
| Get buffer visualization overview targets based on console var | Engine/DebugCameraController.h | ||
void GetNextBuffer
(
int32 Step |
Get next buffer | Engine/DebugCameraController.h | |
void GetNextBuffer
(
const TArray< FString >& OverviewBuffers, |
Get next buffer | Engine/DebugCameraController.h | |
void ReceiveOnActorSelected
(
AActor* NewSelectedActor, |
Called when an actor has been selected with the primary key (e.g. left mouse button). | Engine/DebugCameraController.h |
|
virtual void Select
(
FHitResult const& Hit |
Called when an actor has been selected with the primary key (e.g. left mouse button). | Engine/DebugCameraController.h | |
void SetupBufferVisualizationOverviewInput() |
Sets up or clears input for buffer visualization overview | Engine/DebugCameraController.h |
Overridden from APlayerController
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void SetSpectatorPawn
(
ASpectatorPawn* NewSpectatorPawn |
Set the spectator pawn. | Engine/DebugCameraController.h | |
virtual void SetupInputComponent() |
Allows the PlayerController to set up custom input bindings. | Engine/DebugCameraController.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool EnableDebugBuffers() |
Whether buffer visualization option should be enabled | Engine/DebugCameraController.h | |
static bool EnableDebugViewmodes() |
Whether cycle viewmode option should be enabled | Engine/DebugCameraController.h |