RealDocs

UKismetSystemLibrary::DrawDebugCoordinateSystem

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

Description

Draws red/green/blue lines representing the local X/Y/Z axes at a location and rotation, useful for visualizing an actor or component's orientation.

Caveats & Gotchas

  • Axis colors follow the standard UE convention (X=red, Y=green, Z=blue) and are not configurable.
  • Compiled out entirely in Shipping and Test builds since the UFUNCTION is DevelopmentOnly.
  • Scale of 1.f produces very short axes at gameplay scale — most callers pass 50-200 depending on the actor's size.

Signature

static void DrawDebugCoordinateSystem(const UObject* WorldContextObject, const FVector AxisLoc, const FRotator AxisRot, float Scale=1.f, float Duration=0.f, float Thickness = 0.f, EDrawDebugSceneDepthPriorityGroup DepthPriority = EDrawDebugSceneDepthPriorityGroup::World)

Parameters

Name Type Description Default
WorldContextObject const UObject* World context used to resolve which world to draw in.
AxisLoc const FVector World-space origin of the axes.
AxisRot const FRotator Orientation applied to the drawn X/Y/Z axes.
Scale float Length of each axis line. 1.f
Duration float How long the axes persist, in seconds. 0 draws for a single frame. 0.f
Thickness float Line thickness in screen pixels. 0.f
DepthPriority EDrawDebugSceneDepthPriorityGroup Whether the axes are depth-tested against the scene or always drawn in the foreground. EDrawDebugSceneDepthPriorityGroup::World

Return Type

void

Example

Show a component's world orientation C++
UKismetSystemLibrary::DrawDebugCoordinateSystem(
    this,
    GetActorLocation(),
    GetActorRotation(),
    100.f,
    2.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.