I may be mistaken, but wouldn't scaling the added velocity of the bullet by -2 result in it firing "backwards" (relative to the velocity of the ship)? For example, assuming linear motion:
If ship.vel < unitVecInDirection * 2, bullet fires in opposite direction that ship is pointing in
If ship.vel == unitVecInDirection * 2, bullet has zero velocity (i.e., is stationary)
If ship.vel > unitVecInDirection * 2, bullet fires in same direction but with slower speed, appears to travel backwards w.r.t. ship
I may be mistaken, but wouldn't scaling the added velocity of the bullet by -2 result in it firing "backwards" (relative to the velocity of the ship)? For example, assuming linear motion:
This velocity value also appears to be inconsistent with the StackBlitz implementation: https://stackblitz.com/edit/asteroids2023?file=src%2Fstate.ts%3AL107:
https://stackblitz.com/edit/asteroids2023?file=src%2Ftypes.ts:
BulletVelocity: 2