cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] Prepping for Gear VR controller - is this code in Oculus Utilities 1.12 correct?

drash
Heroic Explorer
Ok, please disregard this post.  Just noticed the two GetDown calls are actually different. One is for RawTouch and the other is for RawButton.  That basically solves my concerns with both 1 and 2.

----

Disclaimer: I don't have Gear VR controller hardware yet (just testing using custom emulation via Touch). 


Two potential issues, just from digging through OVRInput to see how swipes are handled.  

1.

In OVRInput.OVRControllerLTrackedRemote's Update method, there is the following code:

if (GetDown(RawTouch.LTouchpad, OVRInput.Controller.LTrackedRemote))
{
    emitSwipe = true;
    moveAmount = currentState.LTouchpad;
}

if (GetDown(RawButton.LTouchpad, OVRInput.Controller.LTrackedRemote))
{
    emitSwipe = false;
}

My eyes may be failing me, but doesn't this ensure that emitSwipe is always false for the code below this?  There seems to be two identical calls to GetDown(), and the effect seems like it would prevent swipes from ever being reported.

2. 

Of lesser importance is a secondary observation:  In the rest of this Update() method, the code seems to assume a directional swipe has taken place regardless of how far the user's finger has traveled.  It seems like a DpadLeft/Up/Right/Down rawbutton will be reported in the currentState even if the user intended to just tap the touchpad.   I'm currently only relying on touchpad click so not urgent for me, but I thought I would check on this just in case.


Thanks!
  • Titans of Space PLUS for Quest is now available on DrashVR.com
2 REPLIES 2

delphinius81
Rising Star
If the purpose was to just record the move amount, then that code is fine (although rather redundant). Maybe they plan to add more stuff in there for 1.13?

drash
Heroic Explorer
Ok, please disregard this post.  Just noticed the two GetDown calls are actually different. One is for RawTouch and the other is for RawButton.  That basically solves my concerns with both 1 and 2.
  • Titans of Space PLUS for Quest is now available on DrashVR.com