Skip to main content
2 of 2
Clarified title. Removed fluff. Rehosted image on StackExchange to guard against possible future dead link.
Anko
  • 13.5k
  • 10
  • 56
  • 82

In Cocos2D, how do I check for collisions against an arbitrary user-drawn shape?

I want to detect a collision between a sprite and a user-generated shape of some sort.

For example. There are 3 objects on the screen. The user takes their finger and draws an abnormal shape around 2 of the objects. I need to detect those 2 objects.

user shape in purple, game objects in green and red

How do I approach this efficiently using Cocos2D?

David McGraw
  • 4.1k
  • 2
  • 33
  • 38