I am willing to raycast specific layer and ignore other layers no matters its colider is above to my navPoint layer objectraycast specific layer and ignore other layers no matters its colider is above to my navPoint layer object?
int specificLayerMask = LayerMask.GetMask("NavPoint");//raycast only this layer ignore others
if (Physics.Raycast(raycastObject.transform.position, fwd, out objectHit, specificLayerMask))//50
{}
the above code raycasting to navpoint layer but unable to bypass other layers colliders. is there any way available to ignore all other collider and raycast to desired layer only no matter colliders are behind any other collider