cancel
Showing results for 
Search instead for 
Did you mean: 

Can I force OVRPointerVisualizer into Gaze mode by disabling controllers?

pixelcase
Level 2
So I've followed the updated 2018 version of this blog post: https://developer.oculus.com/blog/easy-controller-selection/

.. and I have gotten my controllers working with OVRPointerVisualizer. Per the tutorial, "If no Gear VR controller is connected, this system will fall back to using a gaze pointer."

What I'm looking for is a simple way to toggle the controllers off/gaze pointer on, and vice versa to reset.

I've tried editing the update function of OVRPointerVisualizer.cs and adding a disableControllerLaserPointer bool as per below, which does enable the fallback Gaze sphere object, but I am unable to interact with my canvas.

        void Update()
{
if (disableControllerLaserPointer == true)
{
activeController = OVRInput.Controller.None;
Ray selectionRay = OVRInputHelpers.GetSelectionRay(activeController, trackingSpace);
SetPointerVisibility();
SetPointer(selectionRay);
}
else if (disableControllerLaserPointer == false)
{
activeController = OVRInputHelpers.GetControllerForButton(OVRInput.Button.PrimaryIndexTrigger, activeController);
Ray selectionRay = OVRInputHelpers.GetSelectionRay(activeController, trackingSpace);
SetPointerVisibility();
SetPointer(selectionRay);
}
}

Any thoughts on a better method?
0 REPLIES 0