New issue
 Projects > cocos2d-x > Issues > Bug #4244

Incorrect bitmask test in PhysicsWorld::collisionBeginCallback

Bug #4244 [New]
jwhite40 2014-03-04 10:16

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

Status:New
Start date:2014-03-04
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:-
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.