collision's detection (callback ?!)

Charlie111

22-06-2008 16:57:03

Hi,

I would like to use function onStartTouch(),... and it's work fine with InheritedCallback but I have a problem.

I would call an event no matter the group of objects.
For example, I am group A and I can detect collisions with all objects of group B. But I want to detect collisions between 2 objects of group B too.

Thanks for your help.

+

Gohla

22-06-2008 17:52:06

Just put all objects in the same group, then set the 'B group' to the same group as the 'A group':
mDefaultGroup->setCollisionCallback(mDefaultGroup, NX_NOTIFY_ON_START_TOUCH, false);

I did this once before, but had some problems with collisions being detected twice (because it detects collision A->B and B->A), not sure how to fix that.

Charlie111

22-06-2008 18:02:17

I did it too, but as you said, collisions were detected twice.