RealDocs

UKismetSystemLibrary::DrawDebugCircle

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

Description

Draws a debug circle built from straight line segments, oriented by the YAxis/ZAxis plane vectors rather than a rotator.

Caveats & Gotchas

  • The circle's plane is defined by YAxis and ZAxis, not a normal vector — pass two orthogonal vectors that span the plane you want the circle drawn in.
  • Compiled out entirely in Shipping and Test builds since the UFUNCTION is DevelopmentOnly.
  • Low NumSegments values (below ~8) produce a visibly faceted polygon rather than a smooth circle.

Signature

static void DrawDebugCircle(const UObject* WorldContextObject, FVector Center, float Radius, int32 NumSegments=12, FLinearColor LineColor = FLinearColor::White, float Duration=0.f, float Thickness=0.f, FVector YAxis=FVector(0.f,1.f,0.f), FVector ZAxis=FVector(0.f,0.f,1.f), bool bDrawAxis=false, EDrawDebugSceneDepthPriorityGroup DepthPriority = EDrawDebugSceneDepthPriorityGroup::World)

Parameters

Name Type Description Default
WorldContextObject const UObject* World context used to resolve which world to draw in.
Center FVector World-space center of the circle.
Radius float Radius of the circle.
NumSegments int32 Number of line segments used to approximate the circle. 12
LineColor FLinearColor Color of the drawn circle. FLinearColor::White
Duration float How long the circle persists, in seconds. 0 draws for a single frame. 0.f
Thickness float Line thickness in screen pixels. 0.f
YAxis FVector Vector defining the local Y axis of the circle's plane. FVector(0.f,1.f,0.f)
ZAxis FVector Vector defining the local X axis of the circle's plane (despite the name, this and YAxis together define the plane the circle is drawn in). FVector(0.f,0.f,1.f)
bDrawAxis bool If true, also draws the YAxis and ZAxis direction lines from Center. false
DepthPriority EDrawDebugSceneDepthPriorityGroup Whether the circle is depth-tested against the scene or always drawn in the foreground. EDrawDebugSceneDepthPriorityGroup::World

Return Type

void

Example

Draw a circle in the XY ground plane C++
UKismetSystemLibrary::DrawDebugCircle(
    this,
    GetActorLocation(),
    150.f,
    24,
    FLinearColor::Yellow,
    2.0f,
    1.5f,
    FVector(1.f, 0.f, 0.f),
    FVector(0.f, 1.f, 0.f));

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.