In my experiments, the range of numbers allowed in a physics body’s categories is 1 to 16.
The documentation says the range is 0 to 15.
0 seems to be ignored completely when you try to add it to a body’s categories, and any number over 16 seems to be automatically converted to 16… which is really odd behavior if you ask me, but I’m assuming it’s an artifact of Box2d’s code and not @John’s or @Simeon’s.
@John, @Simeon maybe it would be good to change the code in PhysicsLab, because the categories and masks assigned to bodies in the code are not the ones that actually get used. That could seriously mislead people trying to use PhysicsLab as a guide. See console printout in attached image, which reports on Test5.
@Simeon, that looks right to me, it’s great you were free to jump on that so quickly.
Personally I think it’s just as important, if not more important, to have the example code in PhysicsLab updated, but I get that it might take more work.