Forum Discussion
inuyashazaq
10 years agoHonored Guest
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!
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
- AndyBorrellProtegeI'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/ - inuyashazaqHonored Guest
"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.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 7 months ago
- 2 months ago
- 6 months ago