Skip to main content
GameDev.net gamedev.net
🔒 Locked

Bullet/Ship Conundrum

Started by kylecrass Mar 13, 2006 at 3:11 PM 5 replies 2k views
Original Post
kylecrass
kylecrass
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
ToohrVyk
ToohrVyk
Why are bullets accelerating? Also, if you fire a projectile, and accelerate, you will catch up with it.
kylecrass
kylecrass
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
ToohrVyk
ToohrVyk
If they have the same initial speed and accelerate at a constant and equal rate, the distance between them remains the same.
xegoth
xegoth
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.
oliii
oliii
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.
Everything is better with Metal.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.