Search Unity

Loading scenes with special conditions (Oculus Rift)

Discussion in 'AR/VR (XR) Discussion' started by karaokefreak, Apr 12, 2015.

  1. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    Hi

    Long Story short:

    I created a scene in Unity 5 in which the OVR Camera follows a path, in order to raise the impression of a flight over a football stadium. THe deal was to make it like a themepark ride, so you can look around, but the general direction of flight and view is predetermined.

    Originally, this did not work out quite right, since the OVR Camera would follow this path, but it was always copying the exact angle of each path node. So a turn of 90 degrees sometimes ended up in the cameras flipping into a vertical position, no matter which axis movement I tried to block.

    The trick that made it work was this. I created a normal camera, deactivated all rending functions and set it up to the path - Forcing mouse movement on minimum Y Axis sensitivity prevented it from flipping. I made this camera parent of my OVR Cams - and voila - it worked.
    This actually only worked with a camera in the way it was inteded. Neither the OVR nor another game object would do the trick. Don't ask me why...

    Here is the problem:
    Everything works fine as long as it happens in the initial scene which is loaded when starting up the program
    .
    As soon as I
    - Create a splash screen which comes beforehand
    - Create a second scene and try to load it after Scene 0 started
    - Create a second OVR Cam

    ... the parenting won't work any more. Wait, it does work when it comes to the OVR Cam following the parent, but the view won't follow the path movement any more.
    Hard to describe when you're not a native english speaker... please take a look at my drawing.

    http://karaokefreak.de/1dP/OVR-Setup.jpg


    WHAT I NEED
    It were great if somebody knew either a direct solution for this "pivet rotation" problem or a workaround.
    A workaround could be as easy as additional options in the resolution dialog menu, that allow a choice of scenes before the program is startet. Is that possible, anyway?

    Another workaround could be making the loading of a scene work like a reset of the whole game, so that all initialistations start at point 0
     
    Last edited: Apr 12, 2015
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,433
    That image link is broken..
     
  3. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    Yeah, actually I already fixed it, but the forum software still leads you to the wrong address. Try this one instead (looks the same, but works)

    http://karaokefreak.de/1dP/OVR-Setup.jpg

    ;)