Skip to main content
Inspiring
February 12, 2015

How would I disable rotational tracking?

Anyone know how to disable rotational tracking, but leave the positional tracking on?
Would appreciate any help :)
    This topic has been closed for replies.

    2 replies

    Inspiring
    February 12, 2015
    I don't know of any legitimate reason you would want to do this (so I strongly recommend you DO NOT actually release a demo doing this). However, if you really must for some odd reason, you can do it like this:

    In OVRCameraRig.cs, at the top of the class around line 59 add:

    public bool disableOrientation = false;


    Then on UpdateAnchors() around line 106 change it to check the bool:

    if (!disableOrientation) {
    leftEyeAnchor.localRotation = leftEye.orientation;
    centerEyeAnchor.localRotation = leftEye.orientation; // using left eye for now
    rightEyeAnchor.localRotation = rightEye.orientation;
    }


    Then go into the inspector and on the OVRCamerRig check the "Disable Orientation" button.
    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
    BucketsAuthor
    Inspiring
    February 13, 2015
    I have my reasons ;)
    Thanks for the help, works great.