About the parameters, i use them in this way:
1° your frame time
2° how many sub steps are needed to achieve the frame time
3° internal step time
basically the engine will step always at its internal time (which
should remain fixed) but it will execute many steps to reach your
frame time.
also, the substep value is critical, too low and the simulation won't
reach the frame time, too much and you will waste time, getting worst
performances.
I did some tests with a simple simulation (a ball falling to the
ground) and i fine tuned my code to be like this:
const TIME_STEP:Number = 1/60;
var currentTime:Number = getTimer();
function step()
var newTime:Number = getTimer();
var frameTime:Number = (newTime-currentTime) / 1000;
var subSteps:int = 1+int(frameTime/TIME_STEP);
currentTime = newTime;
world.step(frameTime, subSteps, TIME_STEP);
}
so my simulation always run at 60fps, whichever the rendering frame
rate will be. tested across several systems and under different
situations (from 0 to 750 other objects falling) and the balls always
take the same time to fall :)
Bianco Alessandro