Draw simple line in screen from (x,y) to (x,y)...

So how are you suposed to draw a simple line on the canvas/screen from c++? Is there only 1 way or there’s many ?

Take a look at this wiki article by Rama: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums,Create_Buttons%26_Draw_Materials

The function DrawJoyLine draws a line on the screen

Thank you, looks a lot of things but not simple, " for just a line all of this". lol

What do you mean by that? The tutorial linked by jCoder describes how to setup an entire custom HUD. You only need the following function:


//DrawLine
FORCEINLINE void DrawJoyLine
(
	const FVector2D& Start, 
	const FVector2D& End, 
	const FLinearColor& TheColor, 
	const float& Thick
)
{
	if (!Canvas) return;
	//
 
	FCanvasLineItem NewLine(Start,End);
	NewLine.SetColor(TheColor);
	NewLine.LineThickness = Thick;
	Canvas->DrawItem(NewLine);
}