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

How do i rotate a draw_line in the image direction??

M

Mr.Pelican11

Guest
Hello i have created a laser for a gun and i would like to know how can i rotate the draw_line in the image direction ???
 
This should do the trick:
Code:
laser_length = 100; // or whatever you want here
draw_line(x, y, x + lengthdir_x(laser_length, image_angle), y + lengthdir_y(laser_length, image_angle));
 
you're welcome

btw if you want to draw a streched sprite instead to have more of a laser glow effect, you could use draw_sprite_ext and just put the image angle and the x-scale you want.
 
M

Mr.Pelican11

Guest
you're welcome

btw if you want to draw a streched sprite instead to have more of a laser glow effect, you could use draw_sprite_ext and just put the image angle and the x-scale you want.
I know. Thanks.
 
Top