Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Oculus Quest wrong floor position?

Discussion in 'VR' started by R1PFake, Jun 28, 2019.

  1. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    238
    Im using the built in Unity XR classes. I have a very basic setup 2 controller with a TrackedPoseDriver (Left, Right) and a Camera with a TrackedPoseDriver (Head). I started the project on PC and everything worked fine with this basic setup, correct floor/height etc.

    But it seems that there is a issue with Oculus Quest, because im using the same setup (same scene) and when I start the app on the Quest the floor is way too low, it almost feels like the floor is at the headset height instead of the tracking floor.

    Are there any known issues with the XR classes and Oculus Quest?

    Im using Unity 2019.3.0a7.

    The VR "rig" (TrackedPoseDriver) are setup correctly, because as I said, the same setup works with PCVR (Vive).
     
  2. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    238
    I think I found the "problem".

    For some reason the XRDevice TrackingSpaceType is set to Stationary as default for the Oculus Quest (which makes no sense in my opinion) so the head position is set at the floor position.
    But it's possible to change the TrackingSpaceType to RoomScale (XRDevice.SetTrackingSpaceType returns true) and then the tracking floor/head position is correct.

    So it's good that there is a workaround, but im not sure how the default TrackingSpaceType is set, but it should be RoomScale for the Oculus Quest in my opinion.
     
    Matt_D_work, ROBYER1 and whogas like this.
  3. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    399
    Absolutely baffling as to why it's not roomscale- I will submit a bug report for this else it will not be fixed!
     
    Matt_D_work and hippocoder like this.
  4. PMC0919

    PMC0919

    Joined:
    Sep 8, 2019
    Posts:
    13
     
  5. PMC0919

    PMC0919

    Joined:
    Sep 8, 2019
    Posts:
    13
    Hi. I am not great with the scripts yet in unity. Just using it with sketch up models and trying to make VR walkthroughs. Any chance you could explain where the room scale script should go and how to set it out please?
     
  6. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    399
    Sorry I must have missed this reply, did you still need help with this?
     
  7. MonikaPeters

    MonikaPeters

    Joined:
    Oct 10, 2019
    Posts:
    13
    Can anyone explain how to set out the walking route through VR?
     
  8. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    399
    Do you mean setting the room scale tracking mode?
     
  9. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,814
    Tracking mode on quest is still false for me no matter what, standing, sitting, gyrating. Bugs are bugs I guess. I sent a case but others may not be experiencing the same thing depending on what API they are using, and there are 3 which supposedly work at the same time:

    oculus, unity engine XR and plugin XR. So you can't assume a case for you works for others. Please report a bug if it's not working as intended.
     
    ROBYER1 likes this.
  10. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,814
    I've got it to work by just calling it every frame and hoping for the best basically... not really sure if that's OK.
     
  11. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    399
    It just needs to be called once!
     
  12. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    399
    You can see here how the default setting of tracking space on the Quest puts the head at the floor by default, whereas if we override the tracking space type via script it is then at the correct height. This issue is being flagged to the QA team.

    Forcedroomscaleonviascript.PNG defaultsetting.PNG
     
    hippocoder likes this.
  13. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,814
    That's just it though.... calling it once makes it still kiss the floor. Calling per frame eventually shakes it loose to work as it should :/ crazy right?
     
  14. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    399
    Are you able to share an example of this or even just the player prefab you are seeing this happen on? Sounds very wrong to me or like you have another update function resetting the state of the room scale tracking. Also check you don't have a rigidbody on the mesh using gravity or being pushed down by a collider.
     
  15. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,814
    I think it defaults back to HMD whenever you switch your guardian, which can happen frequently in a house with a smaller roomscale... or even if you pick your headset up a bit later than you should and so on. Interruptions to it, even small, set it off cos somewhere Unity side it keeps assuming the default is standing/sitting and not roomscale. Or it keeps defaulting to HMD and not floor.

    It does this if you change guardian zones for me.
     
  16. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    399
    That makes perfect sense, by default the tracking type should be room scale really as it always knows where the floor is, I have raised it to QA with an example project.
     
  17. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,814
    Really hope you get a 2080 for all these reports I'm too slow / fat to make :D (and thank you)
     
    ROBYER1 likes this.
  18. TheBricktop

    TheBricktop

    Joined:
    Sep 3, 2012
    Posts:
    27
    Same problem same setup, is there a way to get info about getting in/out of guardian? The room tracking should be set again to true whenether you come back to the game.