Easy And Accurate 2D Collisions
It is a simple process to perform box collisions in Cocoa Touch using the CGRectIntersectsRect function, and while this is easy and provides decent performance it does not make for the most accurate collisions.
A couple of new tutorials have been created featuring techniques for creating more accurate collisions methods.
The first tutorial is from 71 Squared on Collision Detection Methods which has a some nice straightforward functions written in C that you can drop into your code for Circle to Rectangle, and Circle to Circle collisions.
The second tutorial is from Ray Wenderlich and goes through the process of how to use sprites in Cocos2D and how to get extremely accurate vertex based collisions using box2D in How To Use Box2D For Just Collision Detection In Cocos2D iPhone.
[Source: 71 Squared, Ray Wenderlich]
Getting started with iPhone and iPad development, and looking for a straightforward guide to get you started with Objective-C fast as possible?
Click here to check out a great straightforward no-nonsense guide to getting started with iPhone development as fast as possible.