• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

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