hi, i'm learning cocos2d-x and box2d. I read this article: http://www.raywenderlich.com/zh-hans/19 ... 8%e5%88%86
but think the storing contacts way is not that direct, i wonder is there a way to write my code like this:
void tick(float duration){
if(bodyCollidesBody(b1, b2)){ //the function name is made up
//do something...
}
}
is there any function like 'bodyCollidesBody', just like the static function CCRect::rectIntersectsRect(x, y) in cocos2d-x?
thx for reply~
but think the storing contacts way is not that direct, i wonder is there a way to write my code like this:
void tick(float duration){
if(bodyCollidesBody(b1, b2)){ //the function name is made up
//do something...
}
}
is there any function like 'bodyCollidesBody', just like the static function CCRect::rectIntersectsRect(x, y) in cocos2d-x?
thx for reply~