Skip to content
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

How to use straight UI pointer interact with UGUI in WebXR #7

Open
luckyyjian opened this issue Aug 15, 2023 · 2 comments
Open

How to use straight UI pointer interact with UGUI in WebXR #7

luckyyjian opened this issue Aug 15, 2023 · 2 comments

Comments

@luckyyjian
Copy link

I've followed the tutorials to add "[L_R]_ UI Pointer on Interactor" prefab under "Indicators.ObjectPointers.Straight"(it's actually in "PointsRenderer"), and set the same active actions in both "Indicators.ObjectPointers.Straight" and "[L_R]_ UI Pointer on Interactor".Then i've added "VRTK4_UI Canvas.cs" in my canvas. I followed all the remaining steps in tutorials like "VRTK4 UI To Pointer" or "VRTK4_Player Object", but when i built in WebGL i can only active the straight line to detect whether the objects have collider.The UGUI button still could not be highlighted.
My editor version is "2021.3.17", is there any step i've missed or wrong?

@studentutu
Copy link
Owner

studentutu commented Aug 17, 2023

Could you check the sample TestScene? Does it work in your case?
Probably - there is an event system that is separate from the scene, you can try and add VRTK4_EventSystem and VRTK4_VRInputModule and remove default eventsystem component and optionally VRTK4_3DGraphicRaycaster

Also, make sure that you are under player preferences - Active Input Handling is set to both if you are using new Input System

@studentutu
Copy link
Owner

I believe you have had the same issue as described in here: #6
There was incorrect sorting of 3D objects and UI elements. Latest (3.0.3) release should fix that issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants