Raycast Hitting Objects But Failing

I have a rather strange issue. In the attached screenshot you will see four raycasts. One from 3 objects, which are trying to determine what region they belong to, and the fourth, hitting the colored region is from mouse input. The mouse input one succeeds, which changes the region color to blue. The rest of the raycasts fail, but I don’t understand why. The spheres are set to ignore raycasts, so the raycast is going through them, hitting the map, and then failing.

What would be causing this behavior?

        Vector3 pos = Camera.main.WorldToScreenPoint(transform.position);		
		Ray ray = Camera.main.ScreenPointToRay(pos);
		RaycastHit hit;
		
		if(!Physics.Raycast(ray, out hit));
		{
			Debug.Log("Raycast failed");
			
			Debug.DrawLine(ray.origin, ray.origin + Vector3.forward * 100f, Color.green, 10000);
			return;
		}

        // Do stuff here

[27980-screen+shot+2014-06-19+at+11.27.06+am.png|27980]

Your Debug.DrawLine does not represent the Raycast. Instead use:

Debug.DrawRay(ray.origin, ray.direction * 1000f, Color.green, 10000);

I solved my issue by creating a custom editor and doing a raycast in that instead. It’s going to save on performance anyways since I don’t have to do it at runtime.