Somes troubles with bullet update
Posted: Tue Jul 26, 2011 1:31 am
Hello World !
First, sorry for my bad english.
I'm a begginer with bullet and I have some problem with my bullet update, i update bullet with this line :
And this is how i declare my bullet world :
In my program i use btCollisionObject for non dynamic object and btKinematicCharacterController for the characters.
I have two problems during the bullet update :
- My update depend of framerate (my character are moving faster sometimes)
- Sometimes, some characters are falling over the floor (wich is a simple btCollisionObject with trimesh).
I searched in this forum but i did'nt find anything to fix my problem.
First, sorry for my bad english.
I'm a begginer with bullet and I have some problem with my bullet update, i update bullet with this line :
Code: Select all
bulletWorld->stepSimulation(timeSinceLastFrame);//timeSinceLastFrame is in second (example : 1.547)
Code: Select all
btDefaultCollisionConstructionInfo collisionConfig;
bulletCollisionConfiguration = new btDefaultCollisionConfiguration(collisionConfig);
bulletDispatcher = new btCollisionDispatcher(bulletCollisionConfiguration);
bulletBroadphase = new btDbvtBroadphase();
bulletSequentialImpulseConstraintSolver = new btSequentialImpulseConstraintSolver;
bulletWorld = new btDiscreteDynamicsWorld(bulletDispatcher, m_bulletBroadphase, bulletSequentialImpulseConstraintSolver, bulletCollisionConfiguration);
bulletWorld->getPairCache()->setInternalGhostPairCallback(new btGhostPairCallback());
bulletWorld->setGravity(btVector3(0, -10.0, 0));
I have two problems during the bullet update :
- My update depend of framerate (my character are moving faster sometimes)
- Sometimes, some characters are falling over the floor (wich is a simple btCollisionObject with trimesh).
I searched in this forum but i did'nt find anything to fix my problem.