I am trying to use a raycast to see if there are any obstacles between two characters. I cannot get any output from the ‘out hit’. All the other raycasts in my same script work fine. Here is what I am using:
RaycastHit hit;
if (Physics.Raycast(transform.position, Action.rangePoint, out hit, Action.range, layerMask))
{
Debug.Log(hit.collider.transform.gameObject.name);
}