Forum Discussion
pixelcase
6 years agoHonored Guest
Can I force OVRPointerVisualizer into Gaze mode by disabling controllers?
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.
Any thoughts on a better method?
.. 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?
Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device