K
Kamon145
Guest
Hi all, I am working on a space shooter and would like to have the bullets come out of the side of the ship, and alternate between left side and right side. As in, the ship can rotate 360 degrees and i want my bullet objects spawning at the tip of one wing, than from the other. Ive used lengthdir_x, and y before but this just seems to spawn the bullet out further from the center, not really moving it from left or right. I came up with one way to do this but it just seems hacky and is causing some other problems. I took my bullet object and had the Y origin at -16, than every time we shoot, a variable called flip is switched from 1, -1 and the bullets image yscale is set to that variable on creation. This does give me the effect I'm looking for with them alternating sides but gets weird if i try to turn the bullets at all because of their way off center origin. So does anybody have a cleaner way of doing this without having a wayyy off center origin?