Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Gear VR Touchpad quirk

Discussion in 'AR/VR (XR) Discussion' started by Mr-Tsunami, Jul 16, 2015.

  1. Mr-Tsunami

    Mr-Tsunami

    Joined:
    Jul 15, 2015
    Posts:
    21
    Hi, I've noticed strange behavior when observing Input.GetAxis("Mouse X") output from Gear VR touchpad.

    The problem is: in the very first frame of touch - when a touch is registered - you can see a non-zero GetAxis() reading. It seems the last touch location is not resetted, remains in memory and is used in calculations.

    The fix is simple, but this behaviour looks like a bug.
     
  2. shelshok

    shelshok

    Joined:
    Feb 18, 2013
    Posts:
    8
    >The fix is simple, but this behaviour looks like a bug.

    What is the fix?
     
    SanSolo likes this.
  3. Mr-Tsunami

    Mr-Tsunami

    Joined:
    Jul 15, 2015
    Posts:
    21
    Simply zero out or discard the first value of Input.GetAxis() on touchdown.
    I use boolean flag to check if the touch is new inside Update()
     
  4. shelshok

    shelshok

    Joined:
    Feb 18, 2013
    Posts:
    8
    Thanks. I ended up ignoring the input for the first couple frames after the touch.
     
  5. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    399
    Thanks, we're investigating where this was introduced. For now please use the workaround described.
     
  6. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    399
    We think it's bad data coming from the touchpad driver. Oculus has been alerted but I don't know if it's fixable.