You are not logged in.
Pages: 1
I made a script that draws a simple rectangular collision mask of an instance:
/// draw_collision_mask(color)
//
// Draws a collision mask of an instance as a rectangle
//
// color color of drawn mask
//
/// GMLscripts.com/license
{
var color;
color = argument0;
draw_set_color(color);
draw_set_alpha(0.1);
draw_rectangle(bbox_left,bbox_top,bbox_right,bbox_bottom,false);
draw_set_alpha(0.3);
draw_rectangle(bbox_left,bbox_top,bbox_right,bbox_bottom,true);
draw_set_alpha(1);
}
Last edited by ClunkyDev (2019-08-08 15:17:34)
Offline
This could be really useful for debugging and maybe effects too. The only thing I'd add is some code to restore global color and alpha values.
Welcome to the forums and thanks for the script.
Abusing forum power since 1986.
Offline
For sure it doesn't as draw_rectangle doesn't draws rotated rectangles.
Offline
Pages: 1