Forum Discussion
AGTDigital
6 years agoExplorer
Issue with OVRInput.Get()
Hello !
Yesterday, I was using the function OVRInput.Get() (On unity), to get a value between 0 and 1 when the index button of the RTouch is Trigger, like that :
Yesterday, I was using the function OVRInput.Get() (On unity), to get a value between 0 and 1 when the index button of the RTouch is Trigger, like that :
float res = OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, OVRInput.Controller.RTouch);
// or float res = OVRInput.Get(OVRInput.Axis1D.SecondaryIndexTrigger, OVRInput.Controller.Touch);
Both worked well.
BUT Today ... I always get 0 when the index button is trigger. Same thing with the hand button, and I already try with the left controller too.
To debug this, I try this code :
When I press the index trigger from the right controller, I have "Button Down ANY" in output but not "Button Down SPECIFIC" (and of course always getting "res : 0", yesterday I got a float between 0 and 1).
Then I saw that there is a release note this week (https://support.oculus.com/release-notes/) and there is some work on controller.
So I need to know if someone get the same behaviour ?
Thanks a lot !
Both worked well.
BUT Today ... I always get 0 when the index button is trigger. Same thing with the hand button, and I already try with the left controller too.
To debug this, I try this code :
float res = OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, OVRInput.Controller.RTouch);
Debug.Log(" res : " + res);
if (OVRInput.Get(OVRInput.Button.SecondaryIndexTrigger))
Debug.Log("Button Down SPECIFIC");
if (OVRInput.Get(OVRInput.Button.Any))
Debug.Log("Button Down ANY");
When I press the index trigger from the right controller, I have "Button Down ANY" in output but not "Button Down SPECIFIC" (and of course always getting "res : 0", yesterday I got a float between 0 and 1).
Then I saw that there is a release note this week (https://support.oculus.com/release-notes/) and there is some work on controller.
So I need to know if someone get the same behaviour ?
Thanks a lot !
4 Replies
- VRengleExplorerI've noticed the same thing. My headset updated last night and now my OVRInput.GetUp function isn't working when I specify OVRInput.Controller.RTouch or OVRInput.Controller.LTouch in the second parameter.
Thankfully my app doesn't require multiple controllers so for now I've changed:
OVRInput.GetUp(OVRInput.Button.One, OVRInput.Controller.RTouch))
to:
OVRInput.GetUp(OVRInput.Button.One)
But, I'm not sure how you're supposed to target specific controllers now. Also not sure if this is a bug or expected... - VRengleExplorerJust found this thread and it seems to fix the issue:
https://forums.oculusvr.com/developer/discussion/comment/698755#Comment_698755 - AGTDigitalExplorerHello, thanks but I've already tried it and I got the same result...
- AGTDigitalExplorerMystery solved for me !
To see which controller was available I used : Debug.Log(OVRInput.GetConnectedControllers());
The output was : RTrackedRemote
So I replace RTouch by RTrackedRemote :
if (OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger, OVRInput.Controller.RTrackedRemote))
/* Some stuff */
And now it works for me.
Hopefully it will help people with the same problem.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 11 months ago
- 1 year ago
- 1 year ago
- 1 year ago