I have two guys that are sphere colliders and several walls that are box colliders. I have a script which I’m trying to use to determine if there is a wall between the guy guys. This is my script and it always returns “Character” as the tag and the DrawRay goes right through the wall. any ideas?
Ray rVisible = new Ray (transform.position,charPosition);
RaycastHit hit;
if(Physics.Raycast (transform.position, charPosition -transform.position , out hit))
{
Debug.Log (hit.collider.tag);
Debug.DrawRay(transform.position, charPosition -transform.position );
}