Download

Rotating a canvas icon on HUD

Hi everyone,
Any idea how to rotate a FCanvasIcon (Don’t think is possible with this one), UTexture2D or even the canvas it’s self?
I have a single hair for a crosshair which I want to create a copy and rotate to make a full crosshair e.g. 4 hairs.

Here’s what I’ve done so far:



// right crosshair
	FCanvasIcon CrosshairXIcon = UCanvas::MakeIcon(CrosshairTexture, 0, 0, TextureXWidth, TextureXHeight);
	Canvas->DrawIcon(CrosshairXIcon, ((Canvas->SizeX) / 2.0f) + ChrosshairDistance, ((Canvas->SizeY) / 2.0f) + (TextureXHeight / 2.0f), ScaleUI);
	
	// left crosshair
	CrosshairXIcon = UCanvas::MakeIcon(CrosshairTexture, 0, 0, TextureXWidth, TextureXHeight);
	Canvas->DrawIcon(CrosshairXIcon, ((Canvas->SizeX) / 2.0f) - (TextureXWidth / 2.0f) - ChrosshairDistance, ((Canvas->SizeY) / 2.0f) + (TextureXHeight / 2.0f), ScaleUI);