Search code examples
iphonecocos2d-iphonecollision-detectionchipmunk

Chipmunk collision detection


I am completely new to chipmunk and I have just been using it for a few days, so I'm guessing this is something pretty obvious, however I cannot find any documentation for this. Is there any callback or method in chipmunk that tells you that 2 given shapes have collided?.

If not is the best way to simply use cgrectcontains on the sprites?.

-Oscar


Solution

  • You can get to it from Ipthnc's link, but this is the documentation you're probably looking for - it details the collision callback system:

    http://chipmunk-physics.net/release/ChipmunkLatest-Docs/#CollisionCallbacks