Search code examples
bulletphysics

What does "step" mean in stepSimulation and what do its parameters mean in Bullet Physics?


What does the term "STEP" means in bullet physics?

What does the function stepSimulation() and its parameters mean?

I have read the documentation but i could not get hold of anything.

Any valid explanation would be of great help.


Solution

  • btDynamicsWorld::stepSimulation(
       btScalar timeStep,
       int maxSubSteps=1,
       btScalar fixedTimeStep=btScalar(1.)/btScalar(60.));
    

    timeStep - time passed after last simulation.

    Internally simulation is done for some internal constant steps. fixedTimeStep

    fixedTimeStep ~~~ 0.01666666 = 1/60

    if timeStep is 0.1 then it will include 6 (timeStep / fixedTimeStep) internal simulations.

    To make glider movements BulletPhysics interpolate final step results according reminder after division (timeStep / fixedTimeStep)