DrawDebugPoint not appearing

I’m trying to debug some code and I need to display some points on screen. The function DrawDebugPoint() (any of the DrawDebug functions in fact) doesn’t work.

None of the functions actually display anything either in the editor on in game.

Here’s how I’m using it:

ARoundedCube::ARoundedCube()
{
	Generate();	
}

void ARoundedCube::Generate()
{
	DrawDebugPoint(
		GetWorld(),
		FVector(0, 0, 0),
		50,  					//size
		FColor(255, 0, 255),	//pink
		false,  				//persistent (never goes away)
		0.03 					//point leaves a trail on moving object
	);

	DrawDebugLine(
		GetWorld(),
		FVector(0, 0, 0),
		FVector(0, 0, 100),
		FColor(255, 0, 0),
		false, -1, 0,
		12.333
	);
}

I’ve verified that the Generate() function does in fact get called, by printing text to the console.

I have a feeling it might be related to the FVectors used in the position argument. If the function is expecting a worldspace vector that might explain why I’m not seeing anything?

Although, in the editor, I did check the 0,0,0 location on the map and didn’t see anything so I’m not sure.

Can anyone shed some light on this?

I might have a related issue, do you found a solution?

If you look at the function signiture:

static void DrawDebugPoint
(
    UObject * WorldContextObject,
    const FVector Position,
    float Size,
    FLinearColor PointColor,
    float Duration
)

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Kismet/UKismetSystemLibrary/DrawDebugPoint/

You’ll notice that the last parameter is the duration to display the debut point, which you have for 0.3 seconds. With that little time, it’s likely that you’re simply missing it.

I would either suggest calling your Generate() function more often (such as in Tick()), or give it a longer time.