|
Hi, I have setted up my own filter callback. But unfortunately disabled pair appear in the collide result , using the following code, what is wrong ????
for (int i=0;i<numManifolds;i++) { btPersistentManifold* contactManifold = physicalWorld->getDispatcher()->getManifoldByIndexInternal(i); btCollisionObject* obA = static_cast<btCollisionObject*>(contactManifold->getBody0()); btCollisionObject* obB = static_cast<btCollisionObject*>(contactManifold->getBody1());
int numContacts = contactManifold->getNumContacts(); if (numContacts > 0) { string *name0, *name1; //printf("collision !\n");
name0 = (string *)obA->getUserPointer(); name1 = (string *)obB->getUserPointer(); printf("%s %s\n",name0->c_str(), name1->c_str());
ret = 1; }
Regards, Steph
|