i searched the physx sdk docs and found the answer:
so, i set the groups correctly but the wrapper has no call for the setGroupCollisionFlag. i just have to build this myself into the wrapper. i guess this will be not a big problem.Collision Groups
The first condition checks the shapes collision group membership. All shapes can be assigned to a collision group with the following call:
NxShape::setGroup(NxCollisionGroup)
The CollisionGroup is simply an integer between 0 and 31. For example, the below call assigns our shape to the 11th group:
myShape->setGroup(11);
All shapes start out in group 0, but this does not really come with any built in meaning. The SDK maintains a 32x32 symmetric Boolean matrix which identifies whether or not shapes of a particular group should be collided against shapes of another group. Initially, all group pairs are enabled. You can change the entries of the matrix with the following call:
NxScene::setGroupCollisionFlag(CollisionGroup g1, CollisionGroup g2, bool enable);
For example, the below call disables collisions between group 11 and group 0:
gScene->setGroupCollisionFlag(11, 0, false);
Collision groups are useful if you know ahead of time that there are certain kinds of actors which should not collide with certain other kinds.
Actors can also be assigned to groups. Actor groups are orthogonal to shape groups, even though they are used for similar things. They work the same way, however there are 0x7fff possible actor groups, instead of only 32 as with shapes. This allows for more flexibility. First, each actor can be assigned to a group as shown below:
myActor->setGroup(333);
By default each actor starts out in group 0. Next, set up relationships between pairs of actor groups:
gScene->setActorGroupPairFlags(333,334, NX_NOTIFY_ON_START_TOUCH | NX_NOTIFY_ON_END_TOUCH);
A combination of the following flags are permitted:
NX_NOTIFY_ON_START_TOUCH, NX_NOTIFY_ON_END_TOUCH, NX_NOTIFY_ON_TOUCH.
See the section on Triggers for an explanation of these flags.
the setCollisionGroup function is in the CPhysxObject class:
Code: Select all
void CPhysxObject::setCollisionGroup(u16 group) {
IPhysxObject::setCollisionGroup(group);
Actor->setGroup(group);
NxShape*const* shapes = Actor->getShapes();
NxU32 nShapes = Actor->getNbShapes();
while (nShapes--)
shapes[nShapes]->setGroup(group;)
}