So you never receive contact points from Add or Persist?
no contact while moving <-- contact Listener
General DiscussionThere's a known bug in Box2DFlash 2.0.0 where Add() sometimes isn't called for contacts between circles and polygons (and I believe I'm also having trouble between circles and circles), but as far as I know, Persist() should be properly called in the cases where Add() is missed, and Remove() is always properly called too.
I don't know if this is exactly the problem you're having right now, but it looks like you'll run into this problem anyway. If contact listeners are important to you, I recommend waiting until Box2DFlash 2.0.1 is ported. If you must use 2.0.X now, though, be warned that you'll sometimes need to treat the first call to Persist as if it's a call to Add():
I don't know if this is exactly the problem you're having right now, but it looks like you'll run into this problem anyway. If contact listeners are important to you, I recommend waiting until Box2DFlash 2.0.1 is ported. If you must use 2.0.X now, though, be warned that you'll sometimes need to treat the first call to Persist as if it's a call to Add():
Code:
public override function Persist(point:b2ContactPoint) : void {
if (/* this is the first call to Persist() for this shape pair */) Add(point);
}
if (/* this is the first call to Persist() for this shape pair */) Add(point);
}
Original thread: https://box2d.org/forum/viewtopic.php?t=801