How can I identify when the ground body collides with another b2Body? I can use b2ContactListener to be notified of collision events, but how do I tell which bodies collided?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
|||||||||||||||
|
|
This is the point of b2Body's For a trivial case, you can make the user data a NSString. For example,
Then inside your
(n.b. This is not compatible with ARC. I wouldn't recommend using ARC with games yet if you're an Objective-C beginner. The libraries aren't ready and the best idioms have not gelled). |
|||
|
|