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

Need Help with Shooting from Sides

Hi folks, I'm bulding a pirate game in which you control top down pirate ships but I need some help with shooting from their SIDE, just like a normal battleship would do. I once again say that it's top down and the ship object is rotating towards the mouse.
 

TheouAegis

Member
At its most basic, just set the direction and image_angle of the bullet to image_angle±90 when the ship creates it. To create the bullet off-center, then instead of creating the bullet at (x,y), create it at (x+lengthdir_x(sprite_height/2,image_angle±90), y+lengthdir_y(sprite_height/2,image_angle±90)).
 
Top