Hi All, In Unity I tried to replace laser pointer using Oculus touch instead of gazepointer like present in the samples. The problem is that I don't know how to trigger events in UI components. Is there somewhere an example to get inspiration?
Have you experimented with the Oculus Sample Framework for Unity? There are quite a few sample scenes that will allow you to jump in and start familiarizing yourself. I would recommend reading up on what it includes at the following link:
The Oculus Sample Framework is difficult to sift through. Here's the quickest way to get set up.
Use the UIHelpers prefab in the Oculus Integrations.
Set the RayTransform in OVRInputModule to a handAnchor.
Add OVRRaycaster component to your canvas.
I think things break when you have an existing eventsystem since the prefab contains its own.
Beware about tinkering with the laser pointer/event system/input module; everything is fairly coupled together so it's hard to modify. If you want to disable the laser pointer, I've found the least problematic way is to destroy and instantiate the UIHelpers prefab.
Thank you for your comment Wei Tin, I was updating my project to the latest Oculus Sample Framework and I could not find any documentation on how to implement the laser pointer. This did the trick!