trouble ignoring a specific layer.

I want to cast a linecast down to check if a player is grounded. My player is a rigidbody ball so I want to ignore the player model its own collider.

if(Physics.Linecast(rTransform.position, rTransform.position + currentGravDirection * 1.5, hit, gameObject.layer))

The problem I have is that this ignores all layers instead of only the layer provided with gameObject.layer. Meaning I only get a hit on objects that are marked as default layer.
Am I doing something wrong or is this a bug?

All in this link

It’ll be something like

~(1 << playerLayer)

You use this to bit shift the number 1 playerLayer times to the left, creating a bitmask. But you want to ignore that layer, not select it so you invert the mask with ~ and test for all layers except that one instead. Read the link for a previous and very detailed answer.