Search Unity

Trying to get boundary data on Oculus Quest

Discussion in 'AR/VR (XR) Discussion' started by Hammarby, Feb 18, 2020.

  1. Hammarby

    Hammarby

    Joined:
    Jan 15, 2019
    Posts:
    2
    Hi, as it says in the title, I'm trying to get the Guardian data from oculus quest during runtime in the HMD.
    I'm using Unity 2019.3 and been trying with booth OVRBoundary.GetGeometry() and XRInputSubsystem.tryGetBoundaryPoints(Vector3[]), nothing seems to work.
    Oculus dev page say that they are static but in Visual Studio I get that it is a non-static (if that makes any sense?).

    It looks simple enough here https://frl.nyu.edu/obtain-guardian-boundaries-on-quest/ but I just cannot make it happen, any ideas anyone?
     
  2. Adrien_Triangles

    Adrien_Triangles

    Joined:
    Feb 4, 2016
    Posts:
    35
  3. Hammarby

    Hammarby

    Joined:
    Jan 15, 2019
    Posts:
    2
  4. miik2

    miik2

    Joined:
    Aug 23, 2018
    Posts:
    5
    What Version do you use exactly?
     
  5. koniouchine

    koniouchine

    Joined:
    Mar 3, 2018
    Posts:
    5
    I've managed to get the boundary data using the following method
    Code (CSharp):
    1.  
    2. public GameObject wallMarker;
    3.  
    4. //Check if the boundary is configured
    5. bool configured = OVRManager.boundary.GetConfigured();
    6.  
    7.         if (configured)
    8.         {
    9.             //Grab all the boundary points. Setting BoundaryType to OuterBoundary is necessary
    10.             Vector3[] boundaryPoints = OVRManager.boundary.GetGeometry(OVRBoundary.BoundaryType.OuterBoundary);
    11.          
    12.              //Generate a bunch of tall thin cubes to mark the outline
    13.             foreach (Vector3 pos in boundaryPoints)
    14.             {        
    15.                 Instantiate(wallMarker, pos, Quaternion.identity);
    16.             }
    17.         }
     
    glenneroo and JoeStrout like this.
  6. Hexodust

    Hexodust

    Joined:
    Nov 21, 2016
    Posts:
    10
    Thanks but it doesen't work with Quest + Link at all. Seems to be a general problem with that. Hope someone manages to solve it.
     
  7. lucidtripper

    lucidtripper

    Joined:
    Aug 3, 2017
    Posts:
    24
    someone get this working with airlink?
     
  8. JPMcWhiskers

    JPMcWhiskers

    Joined:
    Sep 22, 2014
    Posts:
    14
    Boundary data can be retrieved using Virtual Desktop + Debug Mode on the Quest 1 & 2, however the orientation of the player seems to be locked to the current orientation of the player in Virtual Desktop.

    Still, if you're creating a roomscale experience (Good luck, chump!) I believe this is your best bet.