LayerMask usage

Hello

we are trying to use the LayerMask setting in a checksphere cast as to check for a collision with the Ground, that has already its layermask defined.
But when we are trying to pass in the parameter to the checksphere function the layermask we are not able to find out what is the Uint number that we should send. We think that it could be the index position of the matrix, as for example Default is 0, Player is 1, etc. but we are not sure because the results are incongruent.

What is the right way to get it?

Regards
GD

A reference for people with the same problem. I have been able to validate that it is indeed the index of the layer in the layer settings array. So this means that Layer Default has an index of 0, Layer Player is 1, so on

Here are some docs about using layers for masking objects that can be used for raycasts/checks: https://github.com/FlaxEngine/FlaxDocs/blob/master/manual/physics/raycasting.md#example-with-ignoring-colliders

Also, the physics settings asset contains a collision matrix for layers: