Search Unity

Question Play space inconsistencies with OpenXR

Discussion in 'VR' started by SpaceOwlGames, Jun 6, 2021.

  1. SpaceOwlGames

    SpaceOwlGames

    Joined:
    Apr 22, 2016
    Posts:
    61
    Hello,
    Recently converted my game to OpenXR, I and many of my players are reporting strange issues with play space positioning in SteamVR.

    Issue 1: Playspace is high above the floor

    The play space floor is well above where it should be, around 1 room hight of where expected. This happens on the first play-through if the room setup was done, or the headset was asleep during launch. It will go away if the game is restarted.

    Issue 2: Seated / standing play mode positions player in the corner of VRrig play area
    If SteamVR room setup is set to a standing play area (no guardian setup) then the game will position the player in the lower-left corner of the play space and assumes that is the center. This does not happen if room-scale is setup. Also seems to go away if the game or steamvr is restarted.

    Issue 3: Height calibration ignored, headset at floor level
    Reported with Valve Index, using SteamVR standing setting - headset spawns at the VR floor. Headset and controller tracking all works, it just seems the headset zero position is at the floor level.

    These do not happen when playing from Unity editor, only in the build version.

    It's annoying that its hard to reproduce and seems only to happen the first time or after room setup, because its the first time someone is playing the game and will assume its broken all the time.

    My XRRig is using Tracking Origin Mode: Floor

    Has anyone experienced any of the above?
     
    Last edited: Jun 8, 2021
  2. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Can you private message me a player.log file for when this happens? Are you using XRI? Is there a way we could get a build of this to try it ourselves? Ultimately we are going to need to debug what is going on, we should be able to debug it using the built-version. The other option is to submit a bug report through the unity app and upload your project, with that we can debug everything we need. Feel free to private message me to work out getting this resolved. We had some issues in the past with the floor space and having a real world example should help us figure out what is going on.
     
  3. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    The best way to move forward on resolving this will be to submit an official bug report using Help -> Report a Bug. When doing so it is important to include a project that can reproduce the issue, whether it is your actual project or a slimmed down version that reproduces the issue. When you submit a bug if you post the case # here we can make sure we get it routed to our team as fast as possible.
     
  4. SpaceOwlGames

    SpaceOwlGames

    Joined:
    Apr 22, 2016
    Posts:
    61
    Yes, I'm trying to reproduce these with some consistency, my setup works fine most of the time. I have experienced each of these only once, but after you reset SteamVR it works. But players are reporting the same thing in my discord so hard to ignore it.
     
  5. jackpr

    jackpr

    Unity Technologies

    Joined:
    Jan 18, 2018
    Posts:
    50
    That sounds frustrating. I am sorry you are experiencing the issue. If you can manage a minimum reproduction, it will allow us to trace the exact place where the issue is occurring and we can solve the issue for you from there.

    Without a minimum reproduction we can only guess whether it is an issue with an xr rig script, with a runtime, with our openxr plugin code, or something else. In parallel, you can also try engaging on the SteamVR forums. Perhaps someone there has seen your issue.

    Good luck with the reproduction, and I hope we can help solve your problem quickly! If you find a solution please help us out by posting your answer for us and for others!
     
  6. SuperScience

    SuperScience

    Joined:
    Feb 10, 2016
    Posts:
    17
    I am running into the same issue.
    The problem is that... in other VR solutions like the SteamVR plugin, there is a clearly defined PlayArea object in SteamVR, which can be placed, and everything is relative to that object. So if I place the playarea at 0, 0, 0... I know that the forward edge of the playarea (in Unity) is about -1.2m, the right edge is 1.5 m, etc
    Today I started my OpenXR project and placed my headset in the the middle of my playarea and it said it was at -1.239625, -0.3823971, 0.5121347 in Unity.
    ... considering these units are measured in meters, this is an extremely large difference, and my players will start in an area where they cannot reach any controls or objects.
    OpenXR seems fundamentally broken to me... what do I do?
    If I were to guess - It seems to calibrate the center location as the location of the headset at the time when SteamVR launches, rather than a preset, predictable playarea.
     
  7. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Which OpenXR runtime are you using? If it is possible to package up the project you are using and send to use with `Help -> Report a bug` it will be much easier for us to try to figure out what is going on. If you do please post your issue # here.
     
  8. SuperScience

    SuperScience

    Joined:
    Feb 10, 2016
    Posts:
    17
    Hi Apoxol, thank you for the speedy response.

    Unity Version 2020.3.15f2 (current LTS, as-of yesterday)
    OpenXR Plugin: 1.2.8
    XR Plugin Management: 4.0.7

    Bug Report Submitted, Case # 1357487
    I believe that the issue is that OpenXR is not reading the playarea origin properly from SteamVR, and that you will not see the issue in the enclosed report because my SteamVR is not part of the submitted package.

    Here's what I'd like to do...
    If you can't find anything wrong in the enclosed package, email me at the address in the bug report. We will set up a time and I can host a Discord Stream, and we can work through it with the live not-working case. I think this is the most likely scenario to speedily resolve the issue because I can reproduce it 100% (at least, right now).
     
  9. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    The test project you sent is using
    Device
    origin in the VR prefab. If you switch that to
    Floor
    you should see better results. I tested it with device and forced a recenter and saw it go into the ground and then tested it with floor and it stayed in the same place.
     
  10. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
  11. SuperScience

    SuperScience

    Joined:
    Feb 10, 2016
    Posts:
    17
    Ok I feel stupid now.
    I was fiddling with that very control last night, but I never tried "Floor"... the term "floor" just didn't seem to describe the origin I was seeking, so I skipped over it. If it had been named "Playarea Floor" or something like that it would have been the first thing I tried.

    In any case, thank you!
     
  12. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Keep in mind that floor is going to include an uplift where device will not.
     
  13. SuperScience

    SuperScience

    Joined:
    Feb 10, 2016
    Posts:
    17
    What do you mean by "uplift"?
     
  14. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    With device the position of the HMD will be generally an offset from where the device was when OpenXR was started (though each runtime handles this differently). With floor you are relative to a position that the runtime considers the floor which means the device will be relative to the floor and thus have an "uplift" from the floor as controlled by the runtime. Generally this is where your headset is relative to where the floor is on the Y axis. If the floor is a virtual concept it can sometimes be a constant number.