I'm trying to get the collision mask of an object through code, but it does not match what is shown in the debugger. Just as a means of testing I wrote this:
I run this and it returns an Int32.MaxValue (2,147,483,647), which doesn't make sense to me even as a default value (surely this suggests that there are 32 masks and all bits are high). Anyway I put a breakpoint on this line and inspected the node in the debugger, and the debugger (correctly) tells me that the mask is 128.
Why is there this discrepency? My code is failing, because the collision mask property does not reflect what is actually happening in-game.