dedesite
14-08-2008 11:57:34
Hi all, I've got big problem in my game when the FPS is under 60 : the wheel of my car (which the position depend on the centerOfMassPosition of the chassis) aren't following the chassis. They shift on the left when I turn left, on the right when I turn right, behind when I go straight forward etc.
I think the problem comes from the fixedTimeStep which is at 1/60 (so 60FPS) but if I set it to 1/30, it doesn't change anything.
I've try to step the simulation several time in the same frame like that :
But again, no change... Have you got an idea??
Greetings,
Andréas
I think the problem comes from the fixedTimeStep which is at 1/60 (so 60FPS) but if I set it to 1/30, it doesn't change anything.
I've try to step the simulation several time in the same frame like that :
if(GameApplication::getSingleton().getCurrentFPS() > 60.0f)
{
PhysicManager::getSingleton().stepSimulation(evt.timeSinceLastFrame);
}
else
{
int numIter = 40;
for(int i = 0 ; i < numIter ; i++)
{
PhysicManager::getSingleton().stepSimulation(evt.timeSinceLastFrame/numIter);
}
}
But again, no change... Have you got an idea??
Greetings,
Andréas