Similar objects not collide with themselves [solved]

OgreMage

10-05-2008 19:15:31

Hello, I have been using NxOgre 0.9 with PhysX 2.7.3 for a bit now with much success. We are currently not going to upgrade, unless we have to, but plan to in the very near future.

I have a need for many objects to not hit themselves, only others. Imagine bullets, if you will. For practical reasons, they do not hit each other when firing from different weapons, only their targets.

I thought I could disable them by making them all the same group and disabling their collision flags. From my experience, this is only working for different groups! This would be an impractical solution for their could be many bullets in the scene.

How can I have multiple same dynamic objects hit all others but not themselves? Again, setting the collision flag to false between the same groups does not appear to do it!

Thank you dearly,
OM

OgreMage

10-05-2008 19:47:29

Ok so the trick is to use setActorPairFlags NX_IGNORE_PAIR (i.e. not groups, just actor pairs)

marking this solved

thx
om

fassihi

13-05-2008 09:52:30

Should this be done for all actors? Lets say you have 20 actors of the same type, should you call this code for a combination of all of them?