I’m working on an asteroids type game and i’m on the shooting aspect of the game. i was wondering how i would get the bullets to fly in the same direction as the ship when it was fired but not to turn when the ship turns… what i’ve got so far is:
onClipEvent (enterFrame) {
//THE BULLET DIRECTION!!!
movement_x = Math.cos(spcShp._rotation)*10;
movement_y = Math.sin(spcShp._rotation)*10;
this._x += movement_x;
this._y += movement_y;
}
for some reason the bullet just goes in a horrizontal direction…
can someone plz help solve this problem…
thanks.
if you need to see what i mean, here’s the file…