-
-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mouse click on VRTK UI Canvas along with UIPointer possible? #1554
Comments
Unity's UI system only allows using one input module and ours is just a VR input module. Maybe there's an easy way to support mice by just emitting pointer events from the mouse to our UI stuff? I don't really know 😄 |
A more important question is what the purpose of supporting both is. Is it because you want to click in the editor game window, click in the spectator view, or because you want to also support playing your game with a mouse and keyboard? |
Any of the screen space canvases should work for mouse interaction. The example scenes use the SDK Setup Switcher prefab that offers such a GUI which isn't visible in the HMD. |
@dantman I was going for an application in which the UI could be controlled by the user using the Oculus, and the user outside the oculus (in front of the system). |
@bddckr Mouse interaction works fine when I make the canvas mode to Screen space. But this disrupts the control from the Oculus touch. |
I have a similar situation where I have a non-VR camera (rendered on monitor) that needs the ability to click on VRTK_UICanvas items alongside someone using the Vive. |
As I said: Unity's event system only allows one active input module. If you find time to basically merge our VR one with theirs (which does mouse, keyboard and touch) go for it! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hello guys, I was confronted to that need. It's extremely simple to solve (i dont know which version of VRTK i have but one of the latest). Just make VRTK_UICanvas inherit GraphicRaycaster (probably there is also an extra change to do).
Cheers! |
@Eraile I tried your solution, but my mouse clicks still have no response on the menu. |
Hi there, you can simply reactivate the GraphicsRayCasters via Script. Works like a charm.
|
Using the vrtk UI canvas, is there a feature or property that could be used where, Both Oculus touch's pointer and the mouse interaction can be used?
For now, The canvas is made World space and interactable with Oculus UI pointer. How can make the UI elements be interactable with mouse as well?
The text was updated successfully, but these errors were encountered: