Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Quest 2 - longpress recenter in guardian mode

Discussion in 'VR' started by mudloop, Nov 12, 2022.

  1. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Hi,

    When in stationary mode, long-pressing the home button to recenter works.
    But when in guardian mode, the little spinner appears, but the scene isn't recentered like you'd expect.

    Is this a bug? All games I tested do this properly.
    Is there a workaround? Can I detect when the user triggers a recenter and manually reset things?

    Using OpenXR, haven't tried the Oculus plugin.

    Thanks!
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,396
    If other games do have proper functionality make a bug report for it
     
  3. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    399
    fwiw, the OpenXR spec itself provides no mechanism for triggering recentering. It was the wish of the runtimes that it is handled at the system level only.

    If the system level logic isn't sufficient for you - I think the only option is to implement the logic yourself (ie: capture the initial camera pose, and then apply the inverse delta of that transform to your camera's parent upon triggering recentering)
     
    DevDunk likes this.
  4. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Thanks, but I'm not sure you understood correctly. I do not wish to trigger it from my game, I want the game to respond when the user triggers the recenter with the device. When the user wishes to recenter and longpresses the button, the game (ie Unity) should recenter, just like it does in a stationary boundary, and just like the device UI does.

    If I'm supposed to do this manually, how can I listen for the "recenter requested" event?
     
  5. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    399