version: cocos2d-x-3.0beta2
file: CCPhysicsWorld.cpp
In the function PhysicsWorld::collisionBeginCallback Line 265 There is the following if statement
if ((shapeA->getCategoryBitmask() & shapeB->getContactTestBitmask()) == 0 || (shapeB->getContactTestBitmask() & shapeA->getCategoryBitmask()) == 0)
shapeB is never having its CategoryBitMask compared to shapeA's contact test mask.
The correct check should be this
if ((shapeA->getCategoryBitmask() & shapeB->getContactTestBitmask()) == 0 || (shapeB->getCategoryBitmask() & shapeA->getContactTestBitmask()) == 0)
Atom PDF
0%
version: cocos2d-x-3.0beta2
file: CCPhysicsWorld.cpp
In the function PhysicsWorld::collisionBeginCallback
Line 265
There is the following if statement
if ((shapeA->getCategoryBitmask() & shapeB->getContactTestBitmask()) == 0
|| (shapeB->getContactTestBitmask() & shapeA->getCategoryBitmask()) == 0)
shapeB is never having its CategoryBitMask compared to shapeA's contact test mask.
The correct check should be this
if ((shapeA->getCategoryBitmask() & shapeB->getContactTestBitmask()) == 0
|| (shapeB->getCategoryBitmask() & shapeA->getContactTestBitmask()) == 0)