RealDocs

UKismetSystemLibrary::DrawDebugArrow

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

Description

Draws a directional arrow from LineStart to LineEnd, useful for visualizing forward vectors, velocities, or traces.

Caveats & Gotchas

  • Compiled out entirely in Shipping and Test builds since the UFUNCTION is DevelopmentOnly.
  • ArrowSize scales the arrowhead only; a very short LineStart-to-LineEnd distance with a large ArrowSize produces a malformed head.

Signature

static void DrawDebugArrow(const UObject* WorldContextObject, const FVector LineStart, const FVector LineEnd, float ArrowSize, FLinearColor LineColor, 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.
LineStart const FVector World-space tail of the arrow.
LineEnd const FVector World-space tip of the arrow.
ArrowSize float Size of the arrowhead.
LineColor FLinearColor Color of the drawn arrow.
Duration float How long the arrow persists, in seconds. 0 draws for a single frame. 0.f
Thickness float Line thickness in screen pixels. 0.f
DepthPriority EDrawDebugSceneDepthPriorityGroup Whether the arrow is depth-tested against the scene or always drawn in the foreground. EDrawDebugSceneDepthPriorityGroup::World

Return Type

void

Example

Visualize velocity direction C++
const FVector Velocity = GetVelocity();
UKismetSystemLibrary::DrawDebugArrow(
    this,
    GetActorLocation(),
    GetActorLocation() + Velocity,
    20.f,
    FLinearColor::Blue,
    0.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.