Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Kerrin29's avatar
Kerrin29
Honored Guest
4 years ago

InputDevice.TryGetBoundaryPoints() returns no points

I have been developing a game in VR since 2019, I had originally been building it for steamVR, but just purchased the Oculus Quest 2 and am converting it to work with the Unity XR Interaction Toolkit.

A fundamental feature of the game is it knowing your bounds/guardian.

I am trying to use `InputDevice.TryGetBoundaryPoints()`, but have discovered that is always returning 0 points for the boundary. On investigation on the Unity bug forums, I saw this response to the bug.

 

> Oculus Plugin currently does not support TryGetBoundaryPoints through Quest Link. We have forwarded the issue to Oculus.

 

Is this going to be fixed? It pretty hard to debug my code on the quest without access to logs or debugging tools, assuming this returns points even when not run through QuestLink, as my code still doesn't work when installed as an APK, and I have no way of knowing if it is my code at fault, or the function.

4 Replies

Replies have been turned off for this discussion
  • Anonymous's avatar
    Anonymous

    This call works through QuestLink in the Unity Editor (but requires the Oculus Integration installed):

    if (OVRManager.boundary.GetConfigured())
    {
    var bounds = OVRManager.boundary.GetGeometry(OVRBoundary.BoundaryType.PlayArea);
    }

     BoundaryType.PlayArea return four corners, BoundaryType.OuterBoundary return the entire shape of the guardian (I believe).

  • Kerrin29's avatar
    Kerrin29
    Honored Guest

    Thanks, that is very helpful as a temporary solution. I really hope Oculus fix the issue though, as I don't like having the library included for one API call.

    ETA: Actually, when trying this I realised this is not as simple as I thought. To get this to work, I would need to be using OVR for the camera object, which I am not, I don't want to convert the whole project to only work with Oculus, I still need to be using the XR Interaction Toolkit, so that means OVRManager.boundary is null.

     

    Look like I need to wait for Oculus to implement the API fully after all.

    • cazforshort's avatar
      cazforshort
      Expert Protege

      Even further, they are no longer supporting OVR. So you need to use the OpenXR equivalent "tryGetBoundaryPoints", but that returns 0 points for me even when I don't use Link. 

  • Kerrin29's avatar
    Kerrin29
    Honored Guest

    I was aware that OVR was no longer supported, and OpenXR was now the offical API.

    Thanks for confirming that "tryGetBoundaryPoints" doesn't return any points even when not using a link cable.

    I really hope now OpenXR is the official API, they will fix "tryGetBoundaryPoints" of the Quest 2.