The contact depth should be the distance from the edge, but I'll look into it. The point query condition will give a negative queryDist when the point is inside a shape.
That appears to be how the chipmunk library works. Those contacts flicker on and off when you look at it continually. I'll probably investigate further.
I'll try to get those bugs fixed tomorrow. I'm also going to do some internal tweaks to better address future issues and hopefully prevent them.
The collision layers property is a list of 32 layers and whether an object is in one or not. I opted for 8 hexadecimal digits instead of 32 binary to shorten it.
The default value: ffffffff means the object is in all the layers. Whereas 00000001 means the object is in that one layer.
If you don't need all 32 layers and don't want to deal with hexadecimal numbers you can use 1 or 0 and have 8 layers.
The objects can collide if any two digits are both 1. For example:
They can collide.
They won't collide.
Obj1 won't collide with obj2 but both can collide with obj3
Another way you can think of it is as a set of rules of what is allowed to collide with what.
Player collides with wall, enemy and enemy bullets but not player bullets
Wall collides with everything
Player bullet collides with enemy and walls
Enemy bullet collides with player and wall
Enemy collides with wall, enemy and player bullet.
Then you assign a layer to each
Wall, player, enemy, player bullet, enemy bullet
And with the rules set the layers accordingly:
Player bullet 10110
Enemy bullet 11001
Another idea would be to have a seperate background layer with something moving and you don't want the player colliding with it. So for that the player's collision layer could something like 0001 and the background 0010.