Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't understand how to listen for collisions in Cocos2D/Box2D. Say I have two dynamic circle bodies. One is very small and the other is relatively large. When the small circle collides w/ the large circle I'd like to do something (play a sound for example). What's the best way to do this?

I'm currently experimenting w/ the TestPoint method. Something like:

    // collision happened...
    // play sound etc
share|improve this question
up vote 9 down vote accepted

You use b2ContactListener

share|improve this answer
Yes this worked. Thanks! – MrDatabase Apr 20 '11 at 4:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.