UKismetSystemLibrary::DrawDebugPoint
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Draws a single debug point at a world-space location, useful for marking individual sample positions such as trace hits or spline points.
Caveats & Gotchas
- • Compiled out entirely in Shipping and Test builds since the UFUNCTION is DevelopmentOnly.
- • Size is in screen pixels, not world units, so the point's on-screen size doesn't shrink with camera distance the way a world-scale marker would.
Signature
static void DrawDebugPoint(const UObject* WorldContextObject, const FVector Position, float Size, FLinearColor PointColor, float Duration=0.f, EDrawDebugSceneDepthPriorityGroup DepthPriority = EDrawDebugSceneDepthPriorityGroup::World) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| WorldContextObject | const UObject* | World context used to resolve which world to draw in. | — |
| Position | const FVector | World-space location of the point. | — |
| Size | float | Size of the point in screen pixels. | — |
| PointColor | FLinearColor | Color of the drawn point. | — |
| Duration | float | How long the point persists, in seconds. 0 draws for a single frame. | 0.f |
| DepthPriority | EDrawDebugSceneDepthPriorityGroup | Whether the point is depth-tested against the scene or always drawn in the foreground. | EDrawDebugSceneDepthPriorityGroup::World |
Return Type
void Example
Mark a hit location C++
if (bHit)
{
UKismetSystemLibrary::DrawDebugPoint(
this,
HitResult.ImpactPoint,
12.f,
FLinearColor::Red,
3.0f);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?