Search Unity

OculusUsages not working

Discussion in 'AR/VR (XR) Discussion' started by FishStickies94, Apr 4, 2020.

  1. FishStickies94

    FishStickies94

    Joined:
    Jul 27, 2019
    Posts:
    70
    Just messing around with the XRtoolkit and can't seem to get any of the OculusUsages to work (Using a Quest + Link).

    Here's a page on from Oculus on the usage

    My code is as follows:
    Code (CSharp):
    1.         if(controller.inputDevice.TryGetFeatureValue(OculusUsages.thumbTouch, out bool isRest))
    2.         {
    3.             if (isRest)
    4.                 fingerRest = true;
    5.             else
    6.                 fingerRest = false;
    7.         }
    All the other stuff I'm doing with CommonUsages works well but can't get any of the oculus specific stuff to work and don't really know how to debug it. Any help would be appriecated.
     
  2. HorizonsStudio

    HorizonsStudio

    Joined:
    May 29, 2018
    Posts:
    6
    Same here - the values appear correctly in the XR Interaction Debugger, but not when using TryGetFeatureValue.
     
  3. HorizonsStudio

    HorizonsStudio

    Joined:
    May 29, 2018
    Posts:
    6
    Ah OK have figured it out, @TheMaximL. Although it currently displays a warning saying that things like
    indexTouch
    and
    thumbTouch
    will be moved from
    CommonUsages 
    to
    OculusUsages
    , it turns out that for now it's still only implemented in
    CommonUsages
    , so just revert back to that for the moment. Also in
    CommonUsages
    it returns a float - not a bool.
     
  4. FishStickies94

    FishStickies94

    Joined:
    Jul 27, 2019
    Posts:
    70
    Ah ok thanks for that. Will have a look at that!
     
  5. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    Yes, OculusUsages is completely broken in the current build. Have either of you logged a bug for this? If not, I'll log one this weekend.
     
  6. HorizonsStudio

    HorizonsStudio

    Joined:
    May 29, 2018
    Posts:
    6
    @a436t4ataf sorry just saw your message. I didn't logged the bug - did you do it in the end? Sadly this still seems to be broken...
     
    Last edited: Jul 20, 2020
  7. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    I logged the bug.

    Unity closed it claiming it was a duplicate, sent me a link to a separate bug that doesn't describe this. But they refuse to update the original bug to include the full list of what is broken.

    I have asked them multiple times and they're just ignoring me :(.

    I suggest you log it again, and point out that their duplicate bug is wrong. Maybe if enough people keep telling them the same thing, someone at Unity will listen and fix the bug report?

    Here's the one that they used as an excuse for closing mine (even though they are very different): https://issuetracker.unity3d.com/issues/xr-oculususages-dot-indextouch-always-returns-false
     
  8. battou

    battou

    Joined:
    Jan 25, 2011
    Posts:
    222
    Any news? Is there a way to get Touch data in any version of Unity?
     
  9. nostraverse

    nostraverse

    Joined:
    Mar 3, 2021
    Posts:
    12
    IndexTouch seems to work, but for thumbTouch it only works in the computere, when uploading the program to the glasses, it stops working. Any news regarding this?
     
  10. devmedroom

    devmedroom

    Joined:
    Oct 26, 2020
    Posts:
    6
    indexTouch not working for me at all

    Code (CSharp):
    1.    void Update()
    2.     {
    3.      
    4.         //Debug.Log(controller.inputDevice.name);
    5.         if (controller.inputDevice.TryGetFeatureValue(OculusUsages.indexTouch, out var touch))
    6.         {
    7.            Debug.Log(touch);
    8.         }
    9.         else
    10.         {
    11.             Debug.Log("not working");
    12.         }
    13.     }
    Same as CommonUsages. Any news?
     
    Last edited: Sep 24, 2021
  11. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    But that one is in CommonUsages no?

    CommonUsages works fine for most features - if not then something is wrong with your hardware or your setup code.

    About 4-5 months ago they fixed the broken code where some Oculus features weren't coming through. If you've got current XR version it should be working.