cancel
Showing results for 
Search instead for 
Did you mean: 

Laser Pointer instead of Gaze Pointer

dannox
Honored Guest
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?

thanks
4 REPLIES 4

InnerExodus
Adventurer
Hi,

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:

https://developer.oculus.com/documentation/unity/latest/concepts/unity-sample-framework/

Feel free to download this framework, as well as the Avatar SDK at the following links respectively:

https://developer.oculus.com/downloads/package/oculus-sample-framework-for-unity-5-project/
https://developer.oculus.com/downloads/package/oculus-avatar-sdk/

115bwm
Honored Guest
Also looking to do this, those materials don't seem to help 😞

Weitin
Protege
The Oculus Sample Framework is difficult to sift through. Here's the quickest way to get set up.
  1. Use the UIHelpers prefab in the Oculus Integrations. 
  2. Set the RayTransform in OVRInputModule to a handAnchor. 
  3. 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.

FuzzyOnion
Protege
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!