Collision filtering using masking not working properly
Posted: Mon Jul 26, 2010 1:13 pm
I've tried to test the collision filtering feature using masking as seen here http://bulletphysics.org/mediawiki-1.5. ... sing_masks
I chose to make a test using the BasicDemo (one static big box-shaped body for ground and many small box-shaped bodies falling from a height). I've altered the code in BasicDemo::initPhysics() so that the small boxes will interact with the ground but not with themselves.
For the ground body:
For the small bodies:
The problem is that the small boxes pass right through the ground. If I alter the code for the ground creation with this:
it working as it should.
It appears that there is a conflict with the wiki tutorial and something is not right. Any ideas?
I chose to make a test using the BasicDemo (one static big box-shaped body for ground and many small box-shaped bodies falling from a height). I've altered the code in BasicDemo::initPhysics() so that the small boxes will interact with the ground but not with themselves.
For the ground body:
Code: Select all
static_cast<btDiscreteDynamicsWorld*>(m_dynamicsWorld)->addRigidBody(body, COL_WALL, COL_NOTHING);
Code: Select all
static_cast<btDiscreteDynamicsWorld*>(m_dynamicsWorld)->addRigidBody(body, COL_SHIP, COL_WALL);
Code: Select all
static_cast<btDiscreteDynamicsWorld*>(m_dynamicsWorld)->addRigidBody(body, COL_WALL, COL_SHIP);
It appears that there is a conflict with the wiki tutorial and something is not right. Any ideas?