Closed LaercioAsano closed 10 years ago
Hm - I wonder if this problem happens in the upstream code. @slembcke - does this look right to you?
Looking on upstream didn't occur to me...
I would say it won't happen on upstream because of line 34 of: https://github.com/slembcke/Chipmunk2D/blob/master/src/cpArbiter.c
If compared to js, line 234 on https://github.com/josephg/Chipmunk-js/blob/master/lib/cpArbiter.js
There is one condition less...
Maybe this way is better.
Yeah lets roll with that. I'd rather stay in sync as much as we can - its much easier in the long run.
When a collision is ignored (returning false on the begin callback), the related arbiter doesn't make into the arbiter list of the body. But when the shape is removed, the space tries to unthread this ignored arbiter off the body arbiter list, trashing it. I'm not sure if this is a good solution because I could'nt really grasp all the code. But this seems to work for me.