Skip to main content
Up and Coming
September 9, 2013

Realigning view after drift

Hello,

I'd like to implement a button to realign the camera to compensate for drift just like there is in most good demos (B key in Titans of Space, for example).

Being a newb with Unity I am wondering on how to tackle this. I know about the input side (pressing a button and such), but I am not sure where to look for the actual reseting of the camera. There must be a vector to reset to Forward or something like this somewhere.

I have looked into the OVR scripts but I cant really figure out whats going on.

Any hints (example, or function to call) would be much appreciated :geek:
    This topic has been closed for replies.

    6 replies

    September 9, 2013
    I've been able to reset the view by pushing down on the Dpad on the xbox360 controller... I didn't add it, I assume its part of OR camera setup.
    Participant
    September 9, 2013
    If you're using the 0.24 SDK then magnetic yaw correction is on by default as long as it has been calibrated in the Oculus Utility. Which means you shouldn't have a drift problem in that case.

    If you want to reset the forward direction (or set an initial forward direction) use OVRDevice.ResetOrientation(0);
    ludotexAuthor
    Up and Coming
    September 10, 2013
    "ChrisJD" wrote:

    If you want to reset the forward direction (or set an initial forward direction) use OVRDevice.ResetOrientation(0);

    Thanks ChrisJD, that's exactly what I was looking for.

    I am getting much less drift with 0.2.4 also (after calibration) which is great too.
    Vektron Revenge: 2015 vr mobile jam entry and DK2 Version Buddha Clubotron A virtual psychedelic dance club for the rift!
    New Participant
    September 16, 2013
    Are there any good practices on resetting the orientation if the user does not have any input devices (i.e. he cannot press a button to reset the orientation)?

    In my case the user is looking through the Rift just to observe the environment. There is no Keyboard or Gamepad available. After looking around for awhile I start getting a drift in Yaw-direction.
    Inspiring
    September 16, 2013
    You could trying using some sort of head gestures, like nodding a few times.
    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
    Up and Coming
    September 16, 2013
    You could also have an object floating is space (say a mostly transparent sphere) that they could look at for say, 3 seconds, and it pops up a "look forward" text and it resets after 5 seconds of the message being up.

    Just an idea.
    Current Project: Virtual Reality Glove project