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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Oculus Rift Camera Offset.

Discussion in 'AR/VR (XR) Discussion' started by rorylane, May 14, 2016.

  1. rorylane

    rorylane

    Joined:
    Apr 10, 2013
    Posts:
    22
    HI all.

    I recently returned to some DK2 projects that I made in the first half of 2015.

    It seems there's been some sort of changes to the Oculus Rift drivers, because now all of my old projects have these really severe vertical camera offsets.

    If I calibrate the rift to put my default position in a particular place, then I keep my head exactly there, when I press play in Unity, the camera moves up pretty dramatically so that most of my GUI is off the screen.

    Anybody encountered this before?

    Thanks
     
    Last edited: May 16, 2016
  2. rorylane

    rorylane

    Joined:
    Apr 10, 2013
    Posts:
    22
    Well, still no explanation for the mysterious camera offset. I can't be sure if it's something in the new drivers, or maybe some issue with trying to use a DK2 with the new drivers. Anyway, the work around is pretty straight forward for anyone else who encounters this problem. It's a bit of a hack, but you can just reset the camera position manually at some point.

    Import the Oculus Rift utils for Unity, instanciate the OVRDisplay, and call the RecenterPose function.

    OVRDisplay display = new OVRDisplay();
    if (display != null)
    {
    display.RecenterPose();
    }