I have problem with collisions. I use VS 2013 Community Edition and I create onContactBegin function like this:
bool GameScene::onContactBegin(cocos2d::PhysicsContact &contact)
{
PhysicsBody* bodyA = contact.getShapeA()->getBody();
PhysicsBody* bodyB = contact.getShapeB()->getBody();
return true;
}
but when I try to create contact listener:
auto contactListener = EventListenerPhysicsContact::create();
contactListener->onContactBegin = CC_CALLBACK_1(GameScene::onContactBegin, this);
_eventDispatcher->addEventListenerWithSceneGraphPriority(contactListener, this);
my precompiler starts to cry on CC_CALLBACK_1 function:
no instance of overloaded function std::bind matches the argument list
Any help?