But I've encountered an issue concerning determinism, after looking into it a bit more, it seems that the way I call stepSimulation() is the root of the problem.
I'm using a standard "Canonical Game Loop" as it's called on the wiki, in which I adjust the parameters of the RaycastVehicle and then step the physics simulation to finally draw the world.
The stepping is done using this call :
Code: Select all
// getDeltaTime() returns a float containing the delta in seconds since last call
mDynamicWorld->stepSimulation(gSettings->getDeltaTime(), 12, 0.01f);
However i found out that I can get a deterministic behavior by manually inputting the timestep :
Code: Select all
mDynamicWorld->stepSimulation(1/30.f, 12, 0.01f);
So i was wondering what could be wrong with my implementation, Isn't it supposed to work just fine ? am I doing it wrong ? Shouldn't Bullet handle it just fine and interpolate the world ?