b2ContactListener unexpected end-contact

Hello,

I implemented b2ContactListener to catch begin and end contact events. It works fine but I get an unexpected end-contact in the following simple scenario.

1. I create two dynamic bodies (bodyA and bodyB).
2. bodyA touches bodyB. I get a begin contact (ok).
3. I create a revolute joint to "attach" to bodyA and bodyB
4. I get an end-contact in spite of bodyA still overlapping bodyB...

Why am I getting this end-contact? and how can I know when bodyA and bodyB actually cease to overlap?

Thank you in advance for you help.

Regards, Laurent
Joints have a property called 'collideConnected' which specifies whether two bodies connected by the joint should collide with each other.
The default value is false, which would be causing these two bodies to no longer collide.
Hi, thanks for your quick response!

This makes sense indeed. So when the joint is created with "collideConnected" set to false the contact is aborted and that's why I get the end-contact.
I guess I'll have to check "isTouching" in endContact to know if there're still actually overlapping.

Many thanks!

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