Skip to main content
Up and Coming
December 5, 2014

SetYRotation() and ResetOrientation() are dearly missed

Hello Oculus,

Please bring back SetYRotation(float YRotation) functionality, which used to be part of OVRCameraController prior to 0.4.3. We offer Unity developers a VR toolkit, and we have situations where the neutral yaw = 0 needs to be pointing in a specific direction (other than where the tracking camera is) from the start.

I know that we can get the same result by rotating the parent object, but that is way more confusing for developers who use our VR toolkit and easily leads to bugs.

EDIT: Looks like we need OVRDevice.ResetOrientation() back as well. OVRManager.display.RecenterPose() does not work for us because it also changes resets the position tracking origin, which causes unwanted side-effects
    This topic has been closed for replies.

    17 replies

    TtakalaAuthor
    Up and Coming
    January 7, 2015
    Hi vrdaveb,

    If we can apply any rotation AND translation with RecenterPose() and this affects values returned by OVRManager.display.GetEyePose() and other pose functions, then yes, this will be enough for us.

    I'm not entirely sure what you meant with the PoseChanged event and filtering/stomping poses.

    Thanks for listening to our feedback.
    Inspiring
    January 9, 2015
    After the next release, you'll be able to set a custom position and rotation for the tracking space, relative to the OVRCameraRig. If you use that with the current OVRManager.display.RecenteredPose event and the new OVRCameraRig.UpdatedAnchors event, you can modify the tracking and reset behavior in just about any way you need.
    TtakalaAuthor
    Up and Coming
    January 15, 2015
    Cool, cheers!
    New Participant
    April 24, 2015
    Hi All,

    Is this feature added in the latest sdk 0.5.0.1 to reset or add custom orientation?
    Inspiring
    April 24, 2015
    You can reset the orientation like this:

    if (Input.GetKey (KeyCode.L)) {
    OVRManager.display.RecenterPose();
    }


    You can add a rotation value like this:

    Quaternion rotationQuat = Quaternion.Euler (new Vector3 (0.0f, 1.0f, 0.0f));

    if(Input.GetKey(KeyCode.I)){
    CameraRig.transform.localRotation *= rotationQuat;
    }
    if(Input.GetKey(KeyCode.K)){
    CameraRig.transform.localRotation *= Quaternion.Inverse(rotationQuat);
    }
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    August 31, 2015
    Assets/RecenterPlayer.js(4,4): BCE0005: Unknown identifier: 'OVRManager'.

    if (Input.GetKey (KeyCode.L)) {
    OVRManager.display.RecenterPose();
    }


    This isn't working anymore. Is there an updated method now for resetting a view/re-centering?
    http://www.quitenice.co
    Inspiring
    August 31, 2015
    Unity generally doesn't support javascript that depend on C# scripts unless you put the C# scripts in the Standard Assets folder. I would recommend rewriting RecenterPlayer.js in C#. See http://docs.unity3d.com/Manual/ScriptCompileOrderFolders.html.