- #1
Cyberduke
- 4
- 0
Basic Newtonian space physics
Ok I am just making a simple space war simulation game for kicks, using C#
I wanted to build in some customization and let the player pick different guns (think rail guns)
picking the:
-length of the rails (m)
-average force applied to the projectile along the rails (N)
-mass of the projectile (kg)
and the mass of the ship in (kg) will be allready known
ok so F = MA
A = F/M ?
I have tried modeling the acceleration of the projectile and stoping it when the velocity would have ment the projectile position exceeded the length of rails choosen.
but is there a formula I can use to calculate final "muzzle velocity"?
and how can I tell how far the ship would move in the opposite direction?
Is there a better way I could do this?
can someone point me in the right direction please.
Cheers,
Cyberduke
Ok I am just making a simple space war simulation game for kicks, using C#
I wanted to build in some customization and let the player pick different guns (think rail guns)
picking the:
-length of the rails (m)
-average force applied to the projectile along the rails (N)
-mass of the projectile (kg)
and the mass of the ship in (kg) will be allready known
ok so F = MA
A = F/M ?
I have tried modeling the acceleration of the projectile and stoping it when the velocity would have ment the projectile position exceeded the length of rails choosen.
but is there a formula I can use to calculate final "muzzle velocity"?
and how can I tell how far the ship would move in the opposite direction?
Is there a better way I could do this?
can someone point me in the right direction please.
Cheers,
Cyberduke
Last edited: