Search Unity

Resolved Problems with XR Rig Tracking Origin Mode when switching from Oculus Impelmentation to XR

Discussion in 'VR' started by CMDR_DISCO, Jul 13, 2020.

  1. CMDR_DISCO

    CMDR_DISCO

    Joined:
    Feb 10, 2019
    Posts:
    10
    I'm having an issue that started when I switched to XR from the Oculus sdk implementation.

    I have a seated experience, the user is in a cockpit seated in a chair. In real life, the user would also preferably be in a chair as well. When the user uses the Oculus Software to recenter his display, he appears correctly seated in the virtual chair. Lets say in real life the user stands up, and walks to a shorter chair. Now he decides to recenter is display. The user should appear seated in the VR chair and in real life, he is seated on a shorter chair. This is how it used to work. Then I switched to XR.

    Lets suppose I use the "Floor" Tracking Origin Mode. When the user gets up from the taller chair, then switches to the shorter chair, then uses the Oculus software menu to recenter the display, what happens is that he appears too low now. Because its using the floor as the origin, and he is seated on a chair that is lower than the VR chair, he appears too low and his chest is in the seat of the chair. That's not what I want.

    So if I switch to "Device" things are better...almost. Switching to device solves the problem of moving to a shorter chair then recentering the display. When he does this, he appears correctly positioned when using either the tall chair or the short chair. HOWEVER, this only works if the user is the SAME HEIGHT as me when I configured the controller. If a TALLER user uses this mechanism, what happens is the eye level stays the same, but his BUTT now appears to move below the chair!

    I'm not sure what the oculus sdk implementation was doing differently than the XR implemention. Is it that the Oculus Implementaion sets the "Camera Y Offset" based on the user's height when they setup based on the user's height so doesn't have this problem?

    Whats the solution?

    Thanks.
     
    sadambober likes this.
  2. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    Last edited: Nov 5, 2020
  3. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    ok.

    1. when in "floor" tracking origin mode, a "reset" is a strange concept. what you really want to do here is your own "teleport" reset. that is, teleport the user so that they have the correct x/y location as the chair you want. you do this by moving the position of the XR Rig object such that the current x/y position of the headset matches the x/y location of the chair. the "height" is implicit in the reported data coming back from the headset.

    XRI has the functionality to do move the XR Rig this way built in.

    2. a "device" tracking origin reset basically moves 0,0,0 to be where the headset was when the reset was performed. you can use the XR Rig to apply a Y axis offset when in device mode, and change this offset based on the requested user height. in your case, you want to use the players height to describe a mesh, or a controller of some description. you can achieve the correct result in a similar way to #1 by placing the XR Rig in the correct position, and modulating the height of the camera offset game object to match the user height.

    its probably easier to do in floor mode tbh. as the height will always match that of the headset.
     
  4. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    The only gap in
    The only really gap today in seated experiences is that the Quest does not know where your butt is. Like literally it cannot detect it. It can detect the floor and thus your over height, and it could even assume halfway down is your butt, but we all have differnt ratios of torso and leg heights. Until our hips are tracked like with an HTC Tracker or other tech, seated is always going to be off. Plus, their butt might be in a high chair or a low couch. If I am mistaken and there is a way to properly seat a person in a chair and when they look down the height of the chair they are sitting on and the height of the VR seat match, I would love to know. Right now the best I can do is cater to the average hight of a given population.
     
  5. tetto_green

    tetto_green

    Joined:
    Dec 22, 2015
    Posts:
    35
    About the "strange concept" of position reset with floor tracked. Don't you think that actually the strange one is the fact that the position reset logics works in Oculus Quest 2 Home Screen with floor tracked, but is not implemented in OpenXR?
     
    Tovey-Ansell likes this.