Sign in to follow this  
kylecrass

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this