Which version of PhysX are you using?
A question: Why are you using 2 planes instead of one?
Read the PhysX Guide, it says that you need to code a class which inherts from
Inside this class, you need to implement
void onContactModify(PxContactModifyPair* const pairs, PxU32 count);
You also have to register your callback via the contactModifyCallback member of PxSceneDesc or the setContactModifyCallback() method of PxScene.
When you did it right, the you will get an callback while something is colliding.
You could modify the contacts like this:
void YourCallbackClass::onContactModify(PxContactModifyPair* const pairs, PxU32 count)
for (PxU32 a = 0; a < count; a ++)
for (unsigned int b = 0; b < pairs[a].contacts.size(); b++) // All contacts are going to ignore..
— So you need to add to your shape or actor special data to the void * userData member to
identificate your collision objects. (This is the way I did it)
shape->userData = new ActorUserData(“Wall”); // Create a new class ActorUserData or what ever…
Or you could take the normals of the contact and do some fancy stuff with it :D No, that wont work…
I guess its the best way to use the void pointer to do what ever you want with it.
Or just filter these to collisions in a special callback - the first one goes to the ship, the other one to the wall / ground / what ever … there are other ways to archiev it.
Or only generate contacts inside your filterCallback using special filtergroups …