Bullet stepSimulation problem

deathangel67300
Posts: 2
Joined: Wed Dec 22, 2010 5:53 pm

Bullet stepSimulation problem

Post by deathangel67300 »

Hello all, I'm new on using bullet, and I have got a problem with the stepSimulation function.

I read all the page here : http://www.bulletphysics.org/mediawiki- ... _The_World

and my problem is there : timeStep < maxSubSteps * fixedTimeStep

I have got a timeStep that can change between two calls of stepSimulation. If I put values for maxSubSteps and fixedTimeStep to meet the equation above, my objects doesn't move, but if I set them very small so the equation becomes : timeStep > maxSubSteps * fixedTimeStep it works well.

I'd like to know what can be the problem. Is there a possibility that it crashes cause I update my kinematic objects before calling the stepSimulation ?
And for moving kinematic objects, I'm directly setting their transformation using :

Code: Select all

		//get the motion state of the body
		btDefaultMotionState* myMotionState = (btDefaultMotionState*)body->getMotionState();

		//set his opengl transformation
		myMotionState->m_graphicsWorldTrans.setFromOpenGLMatrix(m);
is it OK ?

thank you in advance and sorry for my bad english
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Bullet stepSimulation problem

Post by sparkprime »

What exact values are you using?
deathangel67300
Posts: 2
Joined: Wed Dec 22, 2010 5:53 pm

Re: Bullet stepSimulation problem

Post by deathangel67300 »

Hello

for the moment my timeStep varies between 0.015 and 0.200 seconds (depending on other computation time) and I call it like this :

Code: Select all

world->stepSimulation( (btScalar) NUM2DBL(time), 1, btScalar(0.005f) );
if I set maxSubSteps at 4-5 the simulation doesn't work if timeStep < 0.02