Reputation: 6973
I am new to Box2d in coscos2d. I would like to detect if a b2Body will collide with objects in my world prior to insertion. Is there an easy way to do this?
thanks!
Upvotes: 0
Views: 95
Reputation: 24846
You can use b2QueryCallback
to test if some AABB (defined by you) overlaps with currently existing bodies in 'b2World'. You can create an AABB coinciding with the AABB of your new body you want to add to the world
Upvotes: 1