Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
molton's avatar
molton
Explorer
12 years ago

Having to use OVRDevice.ResetOrientation(0);

Hello, I've been having strange Oculus Rift Orientation problems and I'm not sure if it's because I messed something up or it's just how the Rift works if you use the head tracking coordinates to control player movement, not just head motion. In my game you fly around like a bird and use the rift to control the flight. The problems occur, for example, if I start the game with the rift upside-down, when I put it on and try to look up to get the bird to take off it acts as if I'm looking at the ground, until I execute the line "OVRDevice.ResetOrientation(0);" Which clears up the problem. Sometimes too when you tilt your head back to climb upwards the player will turn while flying even if you are not turning. I added a button in a menu when you hit escape to "recalibrate" the rift if these problems occur. Has anyone else had to deal with this problem?

http://www.lightput.com/Being_a_Bird-Flight_Demo.zip
This demo has the "recalibrate" button I was talking about.

2 Replies

Replies have been turned off for this discussion
  • getnamo's avatar
    getnamo
    Honored Guest
    My understanding is that when you launch the game it takes the initial orientation for a reference which may not be the one you are looking for. Typically developers reset the orientation when they are confident or have instructed users to face forward at the very beginning of the game.

    In other words, expect an initial calibration of the user facing forward to set the view reference frame. Magnetic autocalibration should take care of yaw drift, but you can also manually initiate it when you know the user will be moving their head a lot. Check Rift documentation for more information.