Open KormexGit opened 1 year ago
I would want something like this to be called draw_mask()
or draw_bbox()
, and arguments for "outline true/false" and the sprite whose collision mask is being drawn (defaulting to the calling instance's mask_index
).
Is your feature request related to a problem?
draw_rectangle using bbox coordinates is what many users default to when they want to check their collision mask position. However, on many systems, draw_rectangle (and other draw shape functions) have a off by 1 error where they draw the rectangle 1 pixel bigger on the right and bottom. This leads to many people thinking there's a problem with their mask, even though there isn't.
While the off by 1 error can be worked around for draw_rectangle, there's currently not any easy way to draw non-rectangular masks, like ellipse or rotated rectangles.
Describe the solution you'd like
I'd like to see a draw_collision function, with it's sole purpose being to draw either a filled in shape or an outline of the calling object's current collision mask. This would make it intuitive and convenient to do mask related debugging. It would also be nice if it there was either two functions or an argument toggle for drawing the full mask or the bounding box. If these functions supported all shapes, they could make it easy to make a custom debug mode where all masks are visible.
Describe alternatives you've considered
Some other function or setting that makes masks visible that isn't manually drawing them would also solve the issue.
Additional context
No response