I'm working on a VR project for HTC Vive Cosmos headset and have a huge problem with UI interactions.
The project loads and I can see the rays representing both controllers, but when I try to interact with the UI button nothing happens.
What I tried:
Nothing seems to be working and I got a feeling, the problem is not in UI elements, but in configuring the toolkit itself. Have you any ideas what can I check/change to make UI interactions work?
I encountered a similar problem in one of my scenes.
It seems that I used a normal Canvas, instead of using the XR UI Canvas, which integrated an "InputSystemUIInputModule" component to the EventSystem, instead of the "XR UI Input Module" component.
I hope this will help you.
The problem is solved and it was more an attention error. My controllers have an XR Ray Interactor and it has a property Max Raycast Distance (in Inspector -> XR Ray Interactor -> Raycast Configuration -> Max Raycast Distance). So basically my UI Elements were too far for interactor to detect them. I altered the Max Raycast Distance value and everything now works perfectly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.