Search Unity

Question OpenXR Boundary Alignment Issue

Discussion in 'VR' started by ben_sheftel, Sep 21, 2021.

  1. ben_sheftel

    ben_sheftel

    Joined:
    Nov 20, 2016
    Posts:
    4
    I’m running into an issue when using OpenXR with Oculus (on PC):
    • I would like to keep track of the play area of the player (say for showing a quad on the ground displaying the safe area).
    • I can use XrInputSubsystem.TryGetBoundaryPoints to get the dimensions, but not the positional offset to the center of the rectangle (the points are always centered around 0,0,0)
    • Oculus allows you to Reset View, leading the center to be located away from (0,0,0), but this isn’t reflected in any publicly available manner. The XR Origin transform doesn't appear to shift locations during the Reset action.
    So is there any way to maintain alignment between a virtual object and the play area in OpenXR? Otherwise won't it not be possible to ensure the safety of our users since we can't adapt the play space correctly?
     
    Last edited: Sep 21, 2021
    IS_Twyker likes this.
  2. ben_sheftel

    ben_sheftel

    Joined:
    Nov 20, 2016
    Posts:
    4
    From additional investigation, it appears that Oculus is violating the Stage tracking space specification for OpenXR:

    in that once you've triggered a "Reset View", the origin is now under your feet rather than at the center of the space (and the space isn't axis-aligned any more). I imagine that's more on Oculus' side than Unity's then?
     
    IS_Twyker likes this.
  3. IS_Twyker

    IS_Twyker

    Joined:
    Sep 6, 2021
    Posts:
    35
    @ben_sheftel Did you ever find a good solution for this via OpenXR?