Maths for simulating "rocket boost"
Is there any simple and clever ways to do this.. I know how to calculate where the rocket-boosts "start", this is how i do it:
Rocket1.X = (Cos(D2R(Ship.A - 180 + 30)) * 250) + Ship.X
Rocket1.Y = (Sin(D2R(Ship.A - 180 + 30)) * 250) + Ship.Y
Rocket2.X = (Cos(D2R(Ship.A - 180 - 30)) * 250) + Ship.X
Rocket2.Y = (Sin(D2R(Ship.A - 180 - 30)) * 250) + Ship.Y
'D2R is Degrees to radians
'Ship.A = the angle the ship is heading
'-180 is because the rokets must be placed at the ships "arse"
'30 is just the angle from the middle of the ship, to where the rockets are placed
'250 is the distance between the rocket and the center of the ship
Now i only need to "spit" the flames in some nice way.. how?!
anyone?
[edited by - -Fruz- on September 27, 2002 7:40:50 AM]
Conservation of the moment of inertia :
m*v of the rocket + m*v of the fuel in the rocket + m*v of the fuel ejected = work of the friction forces.
Same with angular momentum relative to the center of gravity (torque effect).
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
m*v of the rocket + m*v of the fuel in the rocket + m*v of the fuel ejected = work of the friction forces.
Same with angular momentum relative to the center of gravity (torque effect).
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement