RealDocs

UKismetSystemLibrary::DrawDebugCamera

function Engine Blueprint Since 4.0
#include "Kismet/KismetSystemLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallable

Description

Draws a wireframe representation of an ACameraActor's frustum, derived automatically from its field of view and aspect ratio.

Caveats & Gotchas

  • Takes an ACameraActor directly rather than a WorldContextObject, so it only works with placed camera actors, not an arbitrary CameraComponent on another actor type.
  • Compiled out entirely in Shipping and Test builds since the UFUNCTION is DevelopmentOnly.

Signature

static void DrawDebugCamera(const ACameraActor* CameraActor, FLinearColor CameraColor = FLinearColor::White, float Duration=0.f)

Parameters

Name Type Description Default
CameraActor const ACameraActor* Camera actor whose position, orientation, and FOV define the drawn shape.
CameraColor FLinearColor Color of the drawn camera frustum. FLinearColor::White
Duration float How long the shape persists, in seconds. 0 draws for a single frame. 0.f

Return Type

void

Example

Visualize a placed camera's frustum C++
UKismetSystemLibrary::DrawDebugCamera(
    MyCameraActor,
    FLinearColor::Yellow,
    1.0f);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.