Search Unity

Resolved OVRManager.boundary.GetGeometry() not affected by guardian changes

Discussion in 'VR' started by PennNeuro, Feb 10, 2021.

  1. PennNeuro

    PennNeuro

    Joined:
    Feb 3, 2017
    Posts:
    6
    I'm trying to do some work with the boundary of my Quest 2. I'm expecting the output of OVRManager.boundary.GetGeometry() to reflect changes that I make to the Quest's guardian. I'm using Oculus Link and running this in the editor.

    If I render the geometry points with spheres, and I put on the headset, I would expect the blue cage to have spheres at the base, but there seems to be no relationship between the spheres and the cage (except they both fit inside my room).

    Code (CSharp):
    1. var geometry = OVRManager.boundary.GetGeometry( OVRBoundary.BoundaryType.OuterBoundary );
    2. for( int i = 0; i < geometry.Length; i++ )
    3. {
    4.     var sphere = GameObject.CreatePrimitive( PrimitiveType.Sphere );
    5.     sphere.transform.localScale = Vector3.one * 0.02f;
    6.     sphere.GetComponent<Renderer>().material.color = Color.cyan;
    7.     sphere.transform.position = geometry[i];
    8. }
    Unfortunately, changes to the guardian have zero effect on where these spheres are rendered. I've tried resetting everything and clearing boundary history. If I just go with the PlayArea instead of the OuterBoundary, I get a smaller, different, but still static set of points.

    When I build for the Quest and run it, the geometry and guardian seem to align as expected. Still, would love for this to work within the Editor.
     
    Last edited: Feb 10, 2021
  2. Tanya_Li

    Tanya_Li

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    105
    Hey,

    Did you try Quest without Link (Android)? I believe that should work and also Rift PC works as well.
    I think there are some remaining issues with Quest Link that boundary points not getting updated while re-centering or guardian changes.
     
  3. PennNeuro

    PennNeuro

    Joined:
    Feb 3, 2017
    Posts:
    6
    Yes, it works when I build for the Quest. I guess I'll wait for these issues to be resolved.

    Thanks!
     
  4. SSilvermanAmat

    SSilvermanAmat

    Joined:
    Jan 25, 2023
    Posts:
    4
    I am trying to get the geometry points as well. It doesn't happen while using quest 2 link in unity. However, it doesnt happen to work if the built is sent directly to the quest 2 headset either for me. :/