unique collisions

Discuss new features and future development.
Post Reply
W.P. van Paassen
Posts: 16
Joined: Tue Aug 21, 2007 3:53 am
Contact:

unique collisions

Post 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.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: unique collisions

Post 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?
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
W.P. van Paassen
Posts: 16
Joined: Tue Aug 21, 2007 3:53 am
Contact:

Re: unique collisions

Post by W.P. van Paassen »

oops, my mistake, I see it already does this and works beautifully, thanks

cheers,
W.P.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests