I am testing some basic raycast hits on a plane and can not get the correct Y value? I am doing this: Code (CSharp): Ray ray = mainCamera.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit, 999,layerMask)) So I then can get the hit.point.y value BUT even with the plane set on y=0 I always get changing negative values for hit.point.y when moving the mouse over the plane. What am I missing here?

Here is some more detail, when printing out Code (CSharp): Debug.Log("Y value of hit is:" + hit.point); Debug.Log("X,y,z value of hit is:" + hit.point.x+" "+hit.point.y+" "+hit.point.z); I get this output with complete messed up values for Y when printing the value of hit.point.y

-1.7E-15 is the same as -1.7*10^(-15) or -0.0000000000000017 so almost zero. Familiarize yourself with scientific number notation. So instead of "complete messed up values" it's only tiny bit off, 100000 times smaller than size of single atom. Small errors like this are expected with fast and approximate floating point calculations used by game engines. This is also why you should almost never use plain equality when comparing floating point values. And even for inequalities you often have to add some room for errors depending on whether false positives or false negatives are better in each specific situation.