Circles as Sensors

Hi Guys,

I've been working on my game for a couple of weeks now and am a bit stuck trying to figure out how to get circles to behave properly as sensors..

I turned debug draw on and took a screenshot to illustrate exactly what the problem is: http://www.dukesbox.com/debugCollision.png

Note that the bottom red go-kart hasnt actually 'properly' collided with the black circle, however it has collided with the box over the circle so it appears in the b2Body.m_contactList.other list, which is what my game is processing at the moment when testing for such collisions. Should I be processing a different list or am I doing something else wrong somewhere maybe?

Many thanks in advance
Yes, you should not be using that list. m_contactList includes speculative contacts, the fact it is marked private with a "m_" should ward you off touching it. I know it's a bit of a pain, but you really should deal with contacts using the contact listener; thanks to CCD it is the only way to reliably get contacts.
Thanks for the explanation Boris, much appreicated. I thought it might be something like that, I'll have another try and trying to work out how to use the contactListener, last time I tried I got a bit too confused and could only find C++ examples

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