Hi!
I want to draw 2d figure on screen.
I drawed 2d line by Draw2DLine function, but others can’t draw.
I drawed 2d box by K2_DrawBox function, but it was filled color, i want to draw unfilled box.
and i can’t find function for circle.
Especially, It must be drawed on forefront!!
f3l1xLtda
(f3l1xLtda)
November 15, 2015, 10:57pm
2
I’m not very good with math, but I solved it this way:
In the On Paint function inside the UMG, I used Draw Line function.
To make boxes or triangles, just change the number of divisions and rotation.
I hope it helped.
Hi! f3l1xLtda.
Thanks to your answer.
But I want to draw figure by user’s mouse action at runtime.
f3l1xLtda
(f3l1xLtda)
November 27, 2015, 1:23am
4
If you want to draw freehand, you can use the same OnPaint function to draw on the screen. I made this widget to draw on the screen and calculate whether it is a circle, does not have 100% accuracy, but it works.
https://dl.dropboxusercontent.com/u/14955199/DrawCircle_WB.uasset
Thanks to your help, f3l1xLtda.
I will try to draw figure by referencing your asset.
Bye.
I made a snippet for those who need it