using categoryBits and maskBits in WCK?

hello!

i dont understand how categoryBits works and how i can mask them in WCK.

how can i put multiple categoryBits in the maskBits field?
I don't know WCK, but you can use the binary OR operator to set multiple bits.

Code:
   0000 0000 0000 0001 = 1
OR 0000 0000 0000 0010 = 2
----------------------
   0000 0000 0000 0011 = 3

So, if you have BIT1 and BIT2 you can use both with BIT1 | BIT2.
thanks for answer.

i have found out this:

when i put "0xffff & ~0x0002" in the maskBits field then it collide with everything but not with the 0x0002 categoryBits.
but how can i add multiple categoryBits to not collide with it?
You know that
0xffff & ~0x0002
allows collision with everything except 0x0002
so by extension
0xffff & ~0x0001 & ~0x0002
allows collision with everything except 0x0001 and 0x0002
This is not working for me. I have the categoryBits for the objects that I do not want to collide set to 0x0002, and I have both of their maskBits set to 0xFFFF & ~0x0002, but they are still colliding. Does anyone know of something I'm missing? Thanks for your help!

Original thread: https://box2d.org/forum/viewtopic.php?t=5828