there's a massive fps drop, for eg:
without Bullet 500/600fps ;
with Bullet 15/25fp.
This happens even if there's only a few physics objects in the scene.
I'm using Bullet like so:
Code: Select all
void Init(){
m_pCollisionConfiguration = new btDefaultCollisionConfiguration();
m_pCollisionDispatcher = new btCollisionDispatcher(m_pCollisionConfiguration);
float bound = 1000000.0F;
btVector3 worldMin(-bound, -bound, -bound);
btVector3 worldMax(bound, bound, bound);
m_pBroadPhase = new btAxisSweep3(worldMin, worldMax, 32766);
m_pConstraintSolver = new btSequentialImpulseConstraintSolver();
m_pDynamicWorld = new btDiscreteDynamicsWorld(m_pCollisionDispatcher, m_pBroadPhase, m_pConstraintSolver, m_pCollisionConfiguration);
m_pDynamicWorld->getDispatchInfo().m_enableSPU = true;
m_pDynamicWorld->setGravity(btVector3(0.0F, -9.8F, 0.0F));
//ground
btTransform t;
t.setIdentity();
btCollisionShape* groundShape = new btStaticPlaneShape(btVector3(0.0F, 1.0F, 0.0F), 0.0F); m_pCollisionShapes.push_back(groundShape);
btRigidBody* groundBody = CreateRigidBody(0.0F, t, groundShape);
groundBody->setRestitution(0);
groundBody->setFriction(1.0F);
m_pDynamicWorld->addRigidBody(groundBody);
}
void Update(float elapsedTime){
if(m_pDynamicWorld)
m_pDynamicWorld->stepSimulation(elapsedTime);
}
Thanks.
Ps: Sorry for any english mistakes, it's not my mother language