4.5
Hello everyone!
I am trying to draw various Shape2D with _draw(). Drawing circles and rectangles is easy with dedicated draw_circle() and draw_rect()
Shape2D
_draw()
draw_circle()
draw_rect()
But how would you draw a CapsuleShape2D?
CapsuleShape2D
Thank you very much in advance for any help
Combine circles and rects if its filled, and arcs and lines if its outlined.
Such a simple solution, thank you so much!
I am just worried because my fill color has transparency, I think the overlap will show
If you only draw a single shape per canvas item you can set the transparency for the whole thing via canvas itemβs modulate. Otherwise you can draw the whole capsule as a polygon, or a composition of a rect and two half-circle polygons.
Thank you for the details, it helps!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.