Mouse in Weird Place in VR, Unity 5.5

I recently upgraded from Unity 5.3 to Unity 5.5 and my Gear VR project’s reticle is now broken. I was previously raycasting from:

centerEye.ScreenPointToRay(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0));

But that caused the reticle to be rendered at the corner of the screen (if it shows up at all). I did some massaging and managed to get the reticle rendered correctly in the center, but now realize that the MOUSE is still at the corner of the screen, and not where the reticle is. So if I want to click something, I need to put the reticle to the side of the object.

I’ve seen references to Unity 5.5 using VRSettings.eyeTextureWidth instead of Screen.width, for example…but I"m never explicitly calling Screen.width. How can I make my mouse cursor be more centered again? Or, is using the mouse discouraged in VR?

My goal is for users to click on objects in VR, which calls the OnMouseUp() function on whatever they clicked.

Hope this helps:

After reviewing the video, I don’t believe it will help. As I said, I’m not using Screen.width anywhere in my code, so I cannot replace it with VRSettings.eyeTextureWidth, which is what the video recommends. I am using the built in Camera.main.ScreenPointToRay method.

I don’t think you should raycast from mouseposition, I think you should raycast from ‘center of vr screen’ which is: centerOfScreen = new Vector2((float)VRSettings.eyeTextureWidth / 2, (float)VRSettings.eyeTextureHeight / 2);

You don’t need to worry about Screen.width and won’t have it because you’re not building for ‘Virtual Reality Supported’ = Disabled (cardboard).

I am raycasting from the mouse position so that Users will see what will be clicked on when they click. Should I ignore mouse position, the reticle will be out of sync from the mouse position.