RealDocs

UKismetSystemLibrary::DrawDebugPlane

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

Description

Draws a finite quad patch representing an infinite mathematical plane, centered at Location and oriented by PlaneCoordinates.

Caveats & Gotchas

  • Only a finite Size x Size patch of the conceptually infinite plane is drawn — the plane itself has no bounds, only the visualization does.
  • PlaneCoordinates is an FPlane (normal + distance from origin), not a rotator, so an actor's rotation must be converted before calling this.
  • Compiled out entirely in Shipping and Test builds since the UFUNCTION is DevelopmentOnly.

Signature

static void DrawDebugPlane(const UObject* WorldContextObject, const FPlane& PlaneCoordinates, const FVector Location, float Size, FLinearColor PlaneColor = FLinearColor::White, 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.
PlaneCoordinates const FPlane& Plane equation (normal and distance) defining the plane's orientation.
Location const FVector World-space location where the plane patch is centered.
Size float Size of the drawn plane patch.
PlaneColor FLinearColor Color of the drawn plane. FLinearColor::White
Duration float How long the plane persists, in seconds. 0 draws for a single frame. 0.f
DepthPriority EDrawDebugSceneDepthPriorityGroup Whether the plane is depth-tested against the scene or always drawn in the foreground. EDrawDebugSceneDepthPriorityGroup::World

Return Type

void

Example

Draw a plane from a hit normal C++
const FPlane HitPlane(HitResult.ImpactPoint, HitResult.ImpactNormal);
UKismetSystemLibrary::DrawDebugPlane(
    this,
    HitPlane,
    HitResult.ImpactPoint,
    100.f,
    FLinearColor::White,
    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.