how to use box2d for collision detection in cocos2d-x
问题 my two sprites are roll and hero. i want to detect their collision using box2d in cocos2d-x i have got both the sprites moving on the screen (roll automatically, hero manually). all i want to do is call the function intersection(); when the two sprites collide. (sprites are declared globally in the *.h file) #include "GameScene.h" #include "HomeScene.h" USING_NS_CC; CCScene* GameScene::scene() { // 'scene' is an autorelease object CCScene *scene = CCScene::node(); // 'layer' is an autorelease