RealDocs

UKismetSystemLibrary::DrawDebugFloatHistoryLocation

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

Description

Draws a 2D histogram of a float value's history at a fixed world location, always billboarded to face the first player's camera.

Caveats & Gotchas

  • Only compiled in development builds — calls are stripped from Shipping/Test via the DevelopmentOnly meta flag, so don't rely on it for runtime UI.
  • The histogram always faces the camera of the first local player; it cannot be oriented manually. Use DrawDebugFloatHistoryTransform if you need explicit orientation control.
  • FloatHistory must already contain samples added via AddFloatHistorySample — passing a freshly constructed struct draws an empty graph.

Signature

static void DrawDebugFloatHistoryLocation(const UObject* WorldContextObject, const FDebugFloatHistory& FloatHistory, FVector DrawLocation, FVector2D DrawSize, FLinearColor DrawColor = FLinearColor::White, float Duration = 0.f)

Parameters

Name Type Description Default
WorldContextObject const UObject* World context used to resolve the world to draw into.
FloatHistory const FDebugFloatHistory& The sample history struct built up via AddFloatHistorySample.
DrawLocation FVector World-space location for the histogram; it always faces the first local player's camera.
DrawSize FVector2D Screen-space size in world units of the drawn histogram.
DrawColor FLinearColor Color of the histogram lines and border. FLinearColor::White
Duration float How long the debug draw persists, in seconds. 0 draws for a single frame. 0.f

Return Type

void

Example

Plot a tracked value each tick C++
// Member: FDebugFloatHistory SpeedHistory;
void AMyPawn::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
	SpeedHistory = UKismetSystemLibrary::AddFloatHistorySample(GetVelocity().Size(), SpeedHistory);
	UKismetSystemLibrary::DrawDebugFloatHistoryLocation(this, SpeedHistory, GetActorLocation() + FVector(0, 0, 100), FVector2D(100, 50), FLinearColor::Green, 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.