I am trying to draw a raycast from my main camera (which is steamvr's "Camera (eye)")
to my mouses point in space so I can select objects in my 3d environment. The problem is my raycast
is not pointing to where my mouse is, and is probably 45+ degrees off. I will post screen shots so you can see my mouse position and the raycast
position. Anyone have this problem or a solution? I am pretty positive it is a steamvr
specific problem.
Link to similar question (not answered yet)
Here is my code:
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
Debug.DrawRay(ray.origin, ray.direction * 100, Color.red);
if (Physics.Raycast(ray, out hit))
{
Debug.Log("Mouse is over: " + hit.collider.name);
}