# Bullet/Ship Conundrum

## Recommended Posts

kylecrass    163
Ok, this may be very complex, or very simple (and I am overlooking something) but here it is! :D Ok I have a ship that can fire bullets. Lets start off easy and build up :D If my ship can travel at 1km / second, and my bullets can fire at 2km / second, then the ship should never catch up to the bullets right? Ok now lets add acceleration :D if my ship is constantly accelerating at 1km / seconds², and so is my bullet the bullet still should always go faster than the ship right? now this is where things get interesting (mwahahahaha) As the ship approaches very fast velocities, it 'appears' the ship ends up catching up to the bullets. Is it just temporal aliasing? (am i using the correct term for when objects blur cuz of their speed?) or am i assuming too much? maybe my game shouldn't approach the speed of light in simulations? hahahaha

##### Share on other sites
jjd    2140
Well, how do you want it to behave? It's your game afterall [smile]

##### Share on other sites
ToohrVyk    1596
Why are bullets accelerating? Also, if you fire a projectile, and accelerate, you will catch up with it.

##### Share on other sites
kylecrass    163
well the bullets accelerate to simulate heat seaking torpedos :D

so if they both accelerate at a constant and equal value they will eventually catch up? intriguing...i didnt think they would lol

Another example of physics kicking my ass haha

##### Share on other sites
ToohrVyk    1596
If they have the same initial speed and accelerate at a constant and equal rate, the distance between them remains the same.

##### Share on other sites
xegoth    154
My guess is your ship is going faster than 2km/s and your bullets always fire at 2km/s.

Remember, if a bullet is being fired out of a moving ship its initial velocity is:
shipVelocity + InitialBulletVelocity.

This is because the bullet is ALREADY moving inside of the ship at the speed of the ship, before it's fired. Whatever the muzzle velocity is, needs to be added to the ships velocity.

##### Share on other sites
oliii    2196
yeah, you should be adding the ship velocity to the bullets.

You may find that some bullets will catch up older ones :)

the acceleration of the ship should have litlle effect on the bullets, bullets should not have any acceleration (unless you want to go insane), but possibly deceleration due to friction.