Stepping trouble

RapchikProgrammer
Posts: 8
Joined: Tue Feb 10, 2009 5:52 am

Stepping trouble

Post by RapchikProgrammer »

Hello,

i am using bullet physics for a mobile title which has been in the works for quite some time.. now the thing is if i step my simulation like so:

world->stepSimulation(float(delta)/1000,3);

it works fine and according to this wiki post: http://bulletphysics.org/mediawiki-1.5. ... _The_World the time step should just follow this equation:

timeStep < maxSubSteps * fixedTimeStep

and my game is supposed to run around 30-60fps which means it should run perfectly as the minimum fps according to this equation for my game is 21 fps..

now the problem occurs if my game is in the 30-40 fps zone it starts to jump.. the meshes are jumping forward and then back to place.. i think its interpolating wrong values and fixing itself when it computes a real time step..

any solutions on this? any help would be appreciated.

edit: one thing i forgot to tell, if i used a hacked statement:

world->stepSimulation(2*float(delta)/1000,3);

the game runs smoothly, but the physics is not deterministic..
User avatar
Yann
Posts: 52
Joined: Wed Sep 28, 2011 8:36 am
Location: France

Re: Stepping trouble

Post by Yann »

Hi,
I got exactly the same issue... Did you get any hint on it ?

Reading the wiki post you linked, I think the problem is that it's actually not 'interpolating' values as it says, but 'extrapolating' values.
And I think the problem is that it's wrongly extrapolated, and when it's computed during the next tick then it's corrected to the real value.

Do anyone knows why it's extrapolating values instead of doing another thick that will allow a real interpolation (and better results, I guess) ?

Would there be any difference if I was using the btContinuousDynamicsWorld instead of the btDiscreteDynamicsWorld ?