• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

Draw Line

Hey guys,

Is it possible that draw_line() function draws the line by one pixel offset in each x, y coordinate? I tested it on a rotating object and drawing a line from the objects sprite origin.

The white pixel is the center for the rotation of the object and as you can see, the line doesn't start from the pixel.

Draw event code:
GML:
draw_self();
draw_line(x, y, 100, y);
Step event code:
GML:
global.dir = point_direction(x, y, mouse_x, mouse_y);
image_angle = global.dir;
Thanks for the answers. :)
 
 

TsukaYuriko

šŸŒ 
Forum Staff
Moderator
Yes, that's possible, but not guaranteed. It depends on your hardware and/or drivers.

For further information, read this:
 
Top