I am implementing collision matrix stuff for my project(bullet solver in Houdini): http://www.sidefx.com/index.php?option= ... 1e4b#96719
and I think that I found the bug.
I using "Filtering Collisions Using a Broadphase Filter Callback" from this page: http://bulletphysics.org/mediawiki-1.5. ... _Filtering
and problem is when I create ground plane:
Code: Select all
btCollisionShape* groundShape = new btStaticPlaneShape(btVector3(0,1,0),1);
btDefaultMotionState* groundMotionState = new btDefaultMotionState(btTransform(btQuaternion(0,0,0,1),btVector3(0,-1,0)));
btRigidBody::btRigidBodyConstructionInfo groundRigidBodyCI(0,groundMotionState,groundShape,btVector3(0,0,0));
btRigidBody* groundRigidBody = new btRigidBody(groundRigidBodyCI);
m_dynamicsWorld->addRigidBody(groundRigidBody);
but when I replace above code for this:
Code: Select all
btVector3 size = btVector3(1000, 2, 1000);
btCollisionShape *fallShape = new btBoxShape(size / 2);
btVector3 fallInertia(0,0,0);
fallShape->calculateLocalInertia(0, fallInertia);
fallShape->setMargin( 0.001 );
btTransform startTransform;
startTransform.setIdentity();
startTransform.setOrigin(btVector3(0, -1, 0));
btDefaultMotionState* fallMotionState = new btDefaultMotionState(startTransform);
btRigidBody::btRigidBodyConstructionInfo fallRigidBodyCI(
0,
fallMotionState,
fallShape,
fallInertia);
btRigidBody* fallRigidBody = new btRigidBody(fallRigidBodyCI);
m_dynamicsWorld->addRigidBody(fallRigidBody);