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.

Discussion Recenter Player in OpenVR Unity

Discussion in 'VR' started by masontprather, Nov 10, 2022.

  1. masontprather

    masontprather

    Joined:
    Apr 13, 2022
    Posts:
    3
    The editor and packages in use:
    Unity 2021.3.2f1
    OpenVR XR Plugin 1.1.4 - Valve Corporation
    OpenXR Plugin 1.5.1 - Unity Technologies
    XR Interaction Toolkit 2.1.1 - Unity Technologies
    XR Plugin Management 4.2.1 - Unity Technologies

    I am developing a research project for my college. I have been asked to use HTC Vive Pro Eye headset (with standing trackers and controllers) as the VR device. Everything has been fairly straightforward with the development except for one issue.

    In the SteamVR application (SteamVR 1.24.6), there is an option on the dashboard (accessed using the System button on the Vive Controllers. The option is called "Recenter" and does exactly what I need for this research project, which is to move the player back to the center of the scene without them moving in real space.

    I have tried a few methods listed in the forums here and on YouTube.

    First attempt: (Todd Wassen miracle solution)

    Valve.VR.OpenVR.System.ResetSeatedZeroPose();

    Valve.VR.OpenVR.Compositor.SetTrackingSpace(Valve.VR.ETrackingUniverseOrigin.TrackingUniverseStanding);


    Second attempt: (Move transform manually)

    XRRig.transform.position = new Vector3(0, XRRig.transform.position.y, 0);


    Any help or insight would be greatly appreciated. Thanks!
     
    gxp_mattias and mrhdms like this.
  2. masontprather

    masontprather

    Joined:
    Apr 13, 2022
    Posts:
    3
    Bump
     
    gxp_mattias likes this.
  3. gxp_mattias

    gxp_mattias

    Joined:
    Oct 5, 2021
    Posts:
    2
    Having the same problem.
    Haven't found any good solution.
    Bump.