Phsysics.Raycast from one gameobject to another?

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);
        }

It looks like you’re using Raycast but passing in 2 worldspace points instead of an origin and direction.

If you want to cast between two world space points, use Physics.Linecast

You are 100% right my friend. This was such a relief.