How does DrawCone and GEngine->DebugEditorMaterial work?

Hello,

I’m trying to implement a ComponentVisualizer where I’d like to draw a cone.
I’m using the same implementation of the debug draw of the LookAt node of the AnimGraph.
Namely:

		// draw the angular clamp
		if (LookAtClamp > 0.f)
		{
			float Angle = FMath::DegreesToRadians(LookAtClamp);
			float ConeSize = 30.f;
			DrawCone(PDI, FScaleMatrix(ConeSize) * CalculateLookAtMatrixFromTransform(ComponentTransform), Angle, Angle, 20, false, FLinearColor::Green, GEngine->DebugEditorMaterial->GetRenderProxy(), SDPG_World);
		}

I’m attaching a picture of the debug drawer in action in the look at.

My question is: how is this DebugEditorMaterial supposed to work, in particular with the DrawCone helper function? Is that the expected behaviour or not? It’s kind of confusing how it works.

I see that it kind of picks a color from the background and uses it as flat draw of the cone.

I tried to plug a simple unlit material with a green color as output, but the result keeps being the background color.
I tried translucent and opaque but nothing changed.

Is it a matter of how the dynamicMeshBuilder is configured?
It seems like it is not setting the constant parameters before the draw.

Thanks in advance