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 Recenter Camera

Discussion in 'VR' started by Conkuist, Dec 12, 2021.

  1. Conkuist

    Conkuist

    Joined:
    Apr 9, 2016
    Posts:
    8
    Im trying to reset the camera orientation with

    Code (CSharp):
    1.  InputTracking.Recenter();
    but it doesn't work.

    I'm using the XR Origin Rig.

    Why is this not working?
     

    Attached Files:

  2. Conkuist

    Conkuist

    Joined:
    Apr 9, 2016
    Posts:
    8
    I'm searching for days now. Does nobody know how to get this working?
     
  3. Tanya_Li

    Tanya_Li

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    101
    Hi,

    Are you using Oculus Quest?
    Re-centering can only be triggered with Quest runtime by long pressing oculus button on the right touch controller. So it is expected that Recenter() is a no-op and that is by design.
     
  4. PeteSmalls

    PeteSmalls

    Joined:
    Apr 29, 2020
    Posts:
    11
    Also been searching for days... there don't seem to be any examples.

    Usecase:
    I need to hit a keyboard key and recenter the headset without the XR interaction toolkit, no wands, etc.
    This used to work easily with the old valve SDK
    Code (CSharp):
    1. using Valve.VR;
    2.  
    3.  
    4.         public void ResetPosition()
    5.         {
    6.             Valve.VR.OpenVR.System.ResetSeatedZeroPose();
    7. Valve.VR.OpenVR.Compositor.SetTrackingSpace(Valve.VR.ETrackingUniverseOrigin.TrackingUniverseSeated);
    8.  
    9.             Debug.Log("PostionReset-TEST");
    10.          }
    Now there is TryRecenter(); but I can't get this to work.

    Anyone make this work yet?