Search Unity

Bug TryGetBoundaryPoints always returns an empty List - Quest (No Link)

Discussion in 'XR Interaction Toolkit and Input' started by Cazforshort, Aug 21, 2021.

  1. Cazforshort

    Cazforshort

    Joined:
    Feb 22, 2016
    Posts:
    16
    Pretty straight forward. This seems to be a bug based on a few other posts I've found indicating the same issues.

    TryGetBoundaryPoints always succeeds, but the points list never has any values. I've made sure to pair it with XRInputSubsystem.boundaryChanged to make sure I don't miss anything, but it never once returns anything.

    I'm running the latest Oculus SDK that is XR only (v31) and I'm ruining OpenXR v1.2.8.

    There are no errors either. Just no points.

    Any help would be really appreciated. Also, if you know who to report bugs too that would help too!
     
    IS_Twyker likes this.
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    Please raise a bug, but also make sure you've done a roomscale boundary setup as well.
     
  3. Cazforshort

    Cazforshort

    Joined:
    Feb 22, 2016
    Posts:
    16
    Yeah it’s still a problem. Any thoughts when it will be fixed?
     
    IS_Twyker likes this.
  4. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    531
    This is a very concerning bug. I run into the same. Bugs can happen, but why it is so concerning to me is that this seems to be such a basic functionality which simply breaks ANY room-scale game out there. I wonder how the releases are tested and if I can actually trust the OpenXR runtime. I was so happy with the switch but bit by bit I realize there are quite some limitations, e.g. no OVROverlay support, no focus events sent anymore by OVRManager etc.
     
    IS_Twyker likes this.
  5. IS_Twyker

    IS_Twyker

    Joined:
    Sep 6, 2021
    Posts:
    35
    +1
    getting the same problem with the Quest 2.

    Update: The same problem persists with the Vive Focus 3 - both are connected via the Link cable, so I think that's the problem. Wireless doesn't work either, obviously.

    Any new ideas @Matt_D_work ?
     
    Last edited: Oct 17, 2021
  6. JeffWTD

    JeffWTD

    Joined:
    Dec 17, 2012
    Posts:
    6
    This still seems to be an issue with latest Oculus XR plugin. After updating I now get an empty list every time.
    Is there a workaround for it until it is fixed?
     
  7. jcarff

    jcarff

    Joined:
    Feb 8, 2017
    Posts:
    3
    I just notices this issue as well. as soon as i updated from unity 2020 to 2021, TryGetBoundaryPoints started returning an empty list instead of the list of boundary points. does anyone know of a solution to this besides downgrading to 2020
     
  8. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    277
    Hey @jcarff,
    So one thing I have noticed is that you have to wait for the
    boundaryChanged
    event to fire or it will always come back empty on
    Start
    /
    Awake
    . Below is some sample code that works for us with OpenXR over Oculus Link:

    Code (CSharp):
    1. using System.Collections.Generic;
    2. using UnityEngine;
    3. using UnityEngine.XR;
    4. using UnityEngine.XR.Management;
    5. public class BoundaryList : MonoBehaviour
    6. {
    7.     void Start()
    8.     {
    9.         var loader = XRGeneralSettings.Instance?.Manager?.activeLoader;
    10.         if (loader == null)
    11.         {
    12.             Debug.LogWarning("Could not get active Loader.");
    13.             return;
    14.         }
    15.         var inputSubsystem = loader.GetLoadedSubsystem<XRInputSubsystem>();
    16.         inputSubsystem.boundaryChanged += InputSubsystem_boundaryChanged;
    17.     }
    18.     private void InputSubsystem_boundaryChanged(XRInputSubsystem inputSubsystem)
    19.     {
    20.         List<Vector3> boundaryPoints = new List<Vector3>();
    21.         if (inputSubsystem.TryGetBoundaryPoints(boundaryPoints))
    22.         {
    23.             foreach (var point in boundaryPoints)
    24.             {
    25.                 Debug.Log(point);
    26.             }
    27.         }
    28.         else
    29.         {
    30.             Debug.LogWarning($"Could not get Boundary Points for Loader");
    31.         }
    32.     }
    33. }
    34.  
    Edit: the above code should work for any XR SDK providers that have that event implemented (so not just OpenXR).
     
    ImpossibleRobert likes this.
  9. IS_Twyker

    IS_Twyker

    Joined:
    Sep 6, 2021
    Posts:
    35
    @VRDave_Unity Can you confirm that you get the actual boundary points or is it still just the 4 corner points of the play area instead?
     
  10. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    277
    @IS_Twyker,
    Sorry, good catch, this is for the Play Area. OpenXR does not currently support getting the actual boundary points through an API. The only current way to get boundary points instead of play-bounds is to use the vendor-specific API.

    Can I ask what you would use the boundary points for vs the usable play area? I've had a few people want boundary points over play area and it would be helpful to understand the use-case so we might push for official support in the OpenXR standard.
     
  11. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    531
    I'd definitely want that for non-rectangular play areas and an upcoming game where I use procedural world generation that can really make use of the full available area.
     
    Snaxz likes this.