Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved XR origin that ISN'T relative to device position on startup?

Discussion in 'VR' started by rwblodgett, May 11, 2021.

  1. rwblodgett

    rwblodgett

    Joined:
    Apr 4, 2017
    Posts:
    66
    Hey, I'm trying to set the "tracking origin mode" to something like "Floor" but instead of it centering on where the device is when the application starts, I want the origin to be the origin of the "tracking space", or the origin that is always the same for the boundaries of the space. Currently Unity provides coordinates to the tracked pose relative to where the device was when it started, but preserves the floor level if set to Floor. I don't want this. I want it to behave so that it doesn't care which way the headset was pointing or where it was when they start the app, the origin and its orientation should always match what was setup in the native home system. Am I missing something easy? I have tried Device, Floor, and Tracking Reference as my choices in the XR Rig "Tracking Origin Mode". But none seem to do what I want. Prior to the XR framework, I could get this to work...

    I am using 2019.4.23 with XR framework 4.0.5 and the steamvr plugin too. I have Oculus Rift S, Steam VR clients (for vive and WMR).
     
  2. rwblodgett

    rwblodgett

    Joined:
    Apr 4, 2017
    Posts:
    66
    Okay, I'm embarrased to admit this. But I found some rogue code recentering the view on startup. The world makes sense again. Setting the Floor tracking mode does what I want. Thanks.
     
  3. JoRouss

    JoRouss

    Joined:
    Apr 1, 2014
    Posts:
    53
    Would you mind sharing your solution?
     
  4. ak2001

    ak2001

    Joined:
    May 7, 2022
    Posts:
    6
    Hi! I've been struggling with this as well. Could you please share the "rogue" code or point to direction where to find it?
     
  5. HermanMyburgh

    HermanMyburgh

    Joined:
    Oct 5, 2022
    Posts:
    1
    It would have been nice to share the code...

    In my case, unplugging and reconnecting to Oculus Link repositioned the tracking of the headset, and solved the issue. It seems to be a loss of "safe zone", at least in my case, that cause the position of the player to shift when hitting play.