Rocket thruster

Hi all,

I've just started out on a Lunar Lander-esque project and I'm trying to implement a system where, when the user hits a button a rocket fires and it slows the rocket's descent.

I've been playing with applyForce, setLinearVelocity
and various other bits I pulled from the APIs but end up with thrusters that do nothing, or which accelerate the rocket wildly upwards at a speed approaching that of light.

So many virtual astronauts have been lost to the heavens that it's time to give up so: using the physics engine, what's the best way to simulate a falling rocket with thrusters?

Any help totally appreciated.

MrC

You should use ApplyForce. However the key is to make sure you are applying a reasonable amount of thrust and to make sure that you have gravity enabled! Otherwise the rocket will go at the speed of light.

The Default value for gravity is 9.8m/s^2, ideally for a rocket you will have somewhere between 1-4x that value.

It doesn't seem like you are currently able to fiddle with mass values in Corona... But I could be wrong.

views:1566 update:2011/10/4 8:06:35
corona forums © 2003-2011