b2ContactListener problem

I'm using b2ContactListener to trigger collision callbacks in my game.

I am noticing that sometimes, even though 2 things are colliding and a physical collision response actually happens (they bounce of off each other), it never makes it into the ContactListener::Add() function.

I have been using collisions for a couple of months now, and only noticed this problem recently where it is "dropping" collisions. I tried turning off collision filters, and switching between circular collision bounds versus rectangular bounds, but it still happens where sometimes the contact listener doesn't report the collision.

Anyone have any idea what might be causing this?

Thank you!
-EJ
i had a similar problem: i had some vehicles colliding visually but no response from the callback functions if they were colliding at low speeds. i found out that the chassis of the vehicle was colliding with the other vehicle but not triggering any response other than altering the physical state of the other object. in fact the initial collision would have been the wheels of the vehicles but i had collision disabled (through groupIndex = -1) for them. the following collision of the two chassis of the vehicles didn't trigger any collision function.

it seems a little bit like a box2d bug to me, but i don't know.

best
joerg
Have you ensured that your contact listener code can accept the pair of shapes either way around; they are not guaranteed to be a particular way around. Otherwise, it might well be a bug.

If it is a bug, could you reproduce the problem in a sample program, preferable the testbed?

Original thread: https://box2d.org/forum/viewtopic.php?t=1573