Page 1 of 1

unique collisions

Posted: Sat Sep 22, 2007 8:53 am
by W.P. van Paassen
Hi,

Is it correct that when calling

cpArrayEach(space->arbiters, &AllCollisions, NULL);

the AllCollisions callback is called twice for every collision between objects. First for the collision between A and B and second for the collision between B and A.

If so, it would be nice if chipmunk only calls the collision callback once for collisions between the same objects. Or are there other ways to do this?

Currently I'm filtering the results myself so it's not that much of a problem but still, it might not be what one expects.

cheers.
W.P.

Re: unique collisions

Posted: Sat Sep 22, 2007 4:40 pm
by slembcke
Shouldn't be doing that. If you are getting more than arbiter for any pair, then it's a bug. I thought I fixed that issue a long long time ago as it was causing issues with the contact persistence. Release 3?

Re: unique collisions

Posted: Sun Sep 23, 2007 2:38 am
by W.P. van Paassen
oops, my mistake, I see it already does this and works beautifully, thanks

cheers,
W.P.