unique collisions

Discuss new features and future development.

unique collisions

Postby W.P. van Paassen » Sat Sep 22, 2007 8:53 am

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.
W.P. van Paassen
 
Posts: 16
Joined: Tue Aug 21, 2007 3:53 am

Re: unique collisions

Postby slembcke » Sat Sep 22, 2007 4:40 pm

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: unique collisions

Postby W.P. van Paassen » Sun Sep 23, 2007 2:38 am

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

cheers,
W.P.
W.P. van Paassen
 
Posts: 16
Joined: Tue Aug 21, 2007 3:53 am


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 1 guest