I'm running a simulation using bullet and have implemented collision filtering. Which seems to work until I disable collisions using the filter. If any collisions occur - which should be filtered out - further collisions after re-enabling the filter are never reported. Right, I've confused myself.
Here's a rough breakdown of the process:
Code: Select all
// The world object is using group 1
// Set object collisions off
((game object)) ->getBroadphaseProxy()->m_collisionFilterGroup = 2;
((game object)) ->getBroadphaseProxy()->m_collisionFilterMask = 0;
// Update simulation (Part 1)
// Simulation is updated a few times here to calculate a trajectory.
// Set object collisions on
((game object)) ->getBroadphaseProxy()->m_collisionFilterGroup = 2;
((game object)) ->getBroadphaseProxy()->m_collisionFilterMask = 1;
// Update simulation as normal (Part 2)
//Eek "collisions" during part 1 have stopped actual collisions in part 2 working.
//We know this because if no collisions occur in part 1, then the collisions in part 2 are correctly resolved, as expected.
Sorry for the lack of information! I need to go!
~Alice