So i have the simple scene:
I simply cannot understand why my raycast hit the ground
In my script i have the following:
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
if (Physics.Raycast(ray, out hit, 1000, LayerMask.NameToLayer("Terrain")))
{
Debug.Log(hit.point);
}
Debug.Log(hit.transform.name);
However whenever i attempt to cast the ray it returns nothing (meaning that it doesnt seem to hit anything)
Can anyone tell me why this is happening?
