Search Unity

Oculus resetting cam orientation on new scene?

Discussion in 'AR/VR (XR) Discussion' started by magglemitch, Apr 9, 2017.

  1. magglemitch

    magglemitch

    Joined:
    Dec 8, 2013
    Posts:
    112
    I have multiple scenes that I'm switching to through buttons you gaze at. Right now it is resetting the camera orientation when you enter a new scene - so if you're looking left when the scene changes, the center is no longer in front of you but now to the left.


    I'm using the OVRManager plugin and not just the built in Unity checkbox for VR. I have unchecked the "reset tracker on load" which I thought would fix it but does not. Anybody had any similar problems like this?
     
  2. sonofbryce

    sonofbryce

    Joined:
    May 19, 2009
    Posts:
    111
    It sounds like you have a separate camera rig setup for each scene, so it initializes the camera each time you load in a new scene. You might have to just have a camera in the main scene and load in the new scenes additively, without their own cameras, unless there's a way to manually set what the normal orientation is.

    I've used:
    Code (csharp):
    1. OVRManager.display.RecenterPose();
    To re-center the camera. Perhaps there's a method for setting it to a manual position.
    Check the docs! (not sure if these are the latest)
    https://developer3.oculus.com/doc/1.3.0-unity/class_o_v_r_manager.html
    https://developer3.oculus.com/doc/1.3.0-unity/class_o_v_r_display.html
     
  3. delphinius81

    delphinius81

    Joined:
    Mar 6, 2012
    Posts:
    57
    I'm trying to deal with this problem as well. @mitchtbh did you ever figure out how to do it?
     
  4. IronStomachVR

    IronStomachVR

    Joined:
    Oct 25, 2013
    Posts:
    22
    Me too. my game is already released but it has been bugging me. I want to patch an update because I am not sure every player will hit the recenter button. Preferably I would like it to have a set forward for when transferring from the title screen to the load level scene so if a player is looking around while loading they are not off center when the next scene comes up.
     
  5. digitalStudio

    digitalStudio

    Joined:
    Jan 30, 2015
    Posts:
    4
    I had exactly the same problem, and spent hours looking for the "patch" to this solution, embedding additional code, until I realized that there are 2 simple options in OVRManager (Script): Reset Tracker On Load and ReorientHMD, which caused this behavior. I hope someone helps this comment. :)
     

    Attached Files: