use NxUserContactReport flags

can any one guide me when and where use NX_NOTIFY_ON_SLIDE and NX_NOTIFY_ON_ROLL and NX_NOTIFY_ON_IMPACT and NX_NOTIFY_FORCES
flags. i registered them by pScene->setActorGroupPairFlags() but i didn t see any result.


Did you take a look at NxUserContactReport? The flags control which contact pairs are reported to onContactNotify.

Which version of the sdk are you using? I can see that in 2.8.3 NX_NOTIFY_ON_IMPACT,
NX_NOTIFY_ON_ROLL, NX_NOTIFY_ON_SLIDE are all documented as not implemented.


Hi gyeoman
I am using 2.8.4. do you know any way to use them?


The best way to learn about this sdk feature is to take a look at the tutorials and samples that ship with the sdk. I’ll try to provide a quick summary of the feature to get you started.

For each actor you can set a group id with NxActor::setGroup. You can then set up how pairs of actors report their contacts by telling the scene what types of contact reports to issue for specific pairs of groups ids. NxScene::setActorGroupPairFlags allows you to do this. The last thing is to implement onContactNotify to allow the contact reports to be received.

Imagine you wanted to get a report every time any dynamic rigid body comes into fresh contact with any static and every time a dynamic rigid body loses contact with a static. To do this you could assign group Id of 0 to all dynamic rigid bodies, and group id of 1 to all static bodies. This is done by calling NxActor::setGroup on all relevant actors. Then you would call NxScene::setActorGroupPairFlags(0, 1, NX_NOTIFY_ON_START_TOUCH | NX_NOTIFY_ON_END_TOUCH). This makes the sdk report all start touch and end touch events for all actors pairs with group ids 0 and 1. To receive the reports you need to implement NxUserContactReport::onContactNotify.

There are several example of this in the samples that ship with the sdk. A good example is the contactStreamIterator sample.

Hope this helps,


Hi gyeoman
thank for your comment but i knew those subjects and i have problem with NX_NOTIFY_ON_IMPACT,
NX_NOTIFY_ON_ROLL, NX_NOTIFY_ON_SLIDE and i don t know what and when use them ?


According to NxUserContactReport.h it looks like these are not implemented in 2.8.4.

<li>NX_NOTIFY_ON_IMPACT,	//unimplemented!</li>
<li>NX_NOTIFY_ON_ROLL,		//unimplemented!</li>
<li>NX_NOTIFY_ON_SLIDE,		//unimplemented!</li>