• 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!

GML How i can create a pointer for a gun?

S

Sergi Canaleta

Guest
if i use a draw_rectangle(x,y,mouse_x,mouse_y,20);

it creates me a rectangle but not do a good pointer

so if i want to create a laser pointer and can collide with every object that is visible how i can do it?
 

TsukaYuriko

☄️
Forum Staff
Moderator
For drawing, you have draw_line_width.
For collision, you could use multiple collision_lines in a loop, one for each pixel, or use a rectangular, rotated, precise collision mask scaled to or created at the desired length and width. There may be other methods.
 
Top