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))
{
DoStuf();
}
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?