Hello,
I am running into some troubles with the Phys2d bitmask on Body's. I would expect that having a collision group of 1 set on two Body's would allow them to collide with each other. However I could not get this to work, so I dug around in the code and noticed this in CollisionSpace.java:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| public void resolve(BodyList bodyList, float dt) { for (int i = 0; i < bodyList.size(); ++i) { Body bi = bodyList.get(i); if (bi.disabled()) { continue; } for (int j = i+1; j < bodyList.size(); ++j) { Body bj = bodyList.get(j); if (bj.disabled()) { continue; } if ((bi.getBitmask() & bj.getBitmask()) != 0) { continue; } ... |
Has any one else encountered this problem? In order for collision groups to work they have to be non-matching bits? - that doesn't make sense...
Thanks,
Tony