p2.js icon indicating copy to clipboard operation
p2.js copied to clipboard

World dispatching 'beginContact' multiple times

Open ghost opened this issue 9 years ago • 2 comments

I have a dynamic body (circle) and when it passes through a static sensor (rectangle) it dispatches 'beginContact' and 'endContact' multiple times while the bodies are still overlapping each other.

ghost avatar Oct 14 '16 22:10 ghost

Bump.

I have seen this too (kind of). I'm trying to replicate this in a simple example, but no luck so far. So it could easily be me just messing something up. I only see this in a bit more complex setup (my game has a ninja rope/distance constraint and a sensor on the bottom of my avatar to know if it's standing or not, but the sensor fires contact events badly. End-contact events when not yet ended, and begin-contact events sometime fires like a second too late.)

I'm using p2 0.7.1 from npm.

Kind Regards,

EDIT: Unbump, here's why https://github.com/schteppe/p2.js/issues/279

ironchestgames avatar Jan 31 '17 19:01 ironchestgames

Bump. Calling world narrowphase.bodiesOverlap provides an incorrect value.

rogerscg avatar Jan 30 '19 02:01 rogerscg