Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
inuyashazaq's avatar
inuyashazaq
Honored Guest
10 years ago

ScreenSpace Mouse Problem, need to use touch screen

EDIT: users do not put on oculus until they done the interactions on a touch screen.
So im looking for a way to either disable temporarily oculus or correct the mouse position on screen.


I need my users to use a touch screen first and then put on an oculus to view. However, the screenspace (screenspacetoRay/toWorldPoint, etc) works optimized for VR so touchscreen point is not where user touched.
There are 2 ways I tried but failed:
1. calculate a fake touch/mouse point, so that then Unity calculates the screen space with the fake point but the result gives the correct position, but I need figure out how Unity converts the position.
2. Use a camera which does not support VR, but Unity just force all cameras to work in VR mode.

So is there any other ways I can do that? I cannot use a virtual cursor but only the exact position users touch.

Thanks!

2 Replies

Replies have been turned off for this discussion
  • I'm not sure what you mean by using a touchscreen?

    If you're trying to use a gaze pointer for interacting with UI elements that normally expect mouse positions then this blog post has some sample code (which you can reuse) showing how to achieve this.

    https://developer.oculus.com/blog/unity ... tem-in-vr/
  • "andyborrel" wrote:
    I'm not sure what you mean by using a touchscreen?

    If you're trying to use a gaze pointer for interacting with UI elements that normally expect mouse positions then this blog post has some sample code (which you can reuse) showing how to achieve this.

    https://developer.oculus.com/blog/unity ... tem-in-vr/



    Thanks for reply.
    Simply my users dont want to put on oculus while they interact with the touch screen, and when they done with the touch screen, they put on oculus to view.
    So if the oculus is always plugged in the computer, the touch point on the screen is distorted to fit the oculus vision, but I need the touch point works as same as when oculus is not plugged in.