Skip to main content
Up and Coming
July 15, 2013

Persistent 'forward' direction

Each time a game/level starts up the 'forward' direction appears to be set to whatever direction you are looking at the time.

What I would like to do is just keep the direction constant, regardless of the Rift's position on start up. Digging through the code I can see that it's grabbing the game's expected start-up position (how it's set in Unity) and using it as an offset to get the Rift in Alignment, but I'd like to ignore this somehow.

Anyone know how to get this working?
    This topic has been closed for replies.

    12 replies

    Inspiring
    July 15, 2013
    I'm not sure it's possible to have a fixed forward direction in between Rift apps, although maybe someday there will be so much VR in our computer lives that the SDK will have a way of maintaining a fixed forward direction that can be used across all apps that use the headtracking.

    In any case, the way I got around this in my own project was to basically show some text on startup saying "please face forward and press spacebar" in a way that it always shown in front of the user (fixed to the Rift cameras, basically). Then when the player hits spacebar, that initializes the "true forward" direction and then proceed with drift calibration in order to maintain that forward direction for the remainder of the app.

    And, whenever I try anyone else's demo, I hold the Rift in my hands facing forward to make sure it picks up the correct forward direction in case it doesn't have a way of initializing it. (Then I put the Rift on, then the headphones, then pick up the controller(s), etc etc haha)
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Up and Coming
    July 16, 2013
    Yeah that is basically what I'm doing at the moment, but I really need it to be more accurate and user friendly.

    Is it possible to get the magnometer data in Unity? I could use that to perform my own alignment, although I feel that approach might only conflict with the Rift's own yaw drift correction.
    Scott Vandonkelaar Zero Latency - Inversion VR
    Up and Coming
    July 16, 2013
    Well, beside the normal "reset" option, for between level use, you could just make a player object in the main menu, and in the control script, simply set it not to destroy on load. That way the start orientation is what it was at the start, from one level to the next.

    That said, if it's first person, the player can simply use the mouse to reorient the rift to the "body" of the player.
    Current Project: Virtual Reality Glove project
    Up and Coming
    July 17, 2013
    I appreciate the ideas for a work-around, but I really need something more reliable and consistent.

    I've been getting more familiar with the OVR Unity classes and from what I'm seeing, it's currently not possible. I really need a method which will return the current magnometer data, or allow me to manually set the yaw offset value, rather that detection.
    Scott Vandonkelaar Zero Latency - Inversion VR
    Inspiring
    July 17, 2013
    How would you know which way your users will be facing? Their desk can be oriented in any "forward" direction and still be correct. Taking the starting orientation as "forward" is the best method aside from having some sort of global configuration.
    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
    July 17, 2013
    In my case I'll know which way is forward as it will be a purpose built application.

    I think I've now narrowed down what I need, and I think others could certainly find it useful as well.

    All that would be needed is 2 methods for get/set the magnometer offset (which is helping the rift decide it's 'forward' direction).

    This would mean any developer would be able to grab the mag offset at the end of a level and re-load it within the next. This would help make the use of the rift more seamless for the users as they won't have to constantly recalibrate at the start of each level/session.

    At the moment I'm just ensuring the Rift is facing a specific physical direction on every start but it's tedious. Being able to handle this in software would be great.

    Does this sound like a possible addition to the API?
    Scott Vandonkelaar Zero Latency - Inversion VR
    Inspiring
    July 18, 2013
    Would you really be able to avoid recalibrating? Pretty great if you are able to do that consistently. I'm wondering if you saw this in the SDK docs:

    Our current calibration procedure requires that magnetometer readings are taken from four different Rift orientations, precisely at the time and place where the user is about to play. The extracted calibration parameters are useful only for a particular Rift at a particular location. If it is moved by a meter, then the parameters may be invalid. If you want to return to the same place on another day with the same Rift, and try to use a previously stored calibration, then experiment at your own risk!
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Up and Coming
    July 18, 2013
    Cheers drash, I had not seen that. Where is it in the documentation? It's implying that I am amble to get the configuration and re-use it, but I still haven't found where/how. I'm aware of the risks with doing so, but I just have to try.
    Scott Vandonkelaar Zero Latency - Inversion VR
    Inspiring
    July 18, 2013
    "diablosv21" wrote:
    Cheers drash, I had not seen that. Where is it in the documentation? It's implying that I am amble to get the configuration and re-use it, but I still haven't found where/how. I'm aware of the risks with doing so, but I just have to try.


    Section 5.3.2 "Magnetometer-based yaw error correction" of the "SDK Overview" PDF. Not sure if this is the latest one I'm looking at, though.

    In any case, good luck!
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Up and Coming
    July 18, 2013
    Cheers, looks like that section of the documentation has been updated:

    If may very well be the case that the calibration values will work in other places or at other times in the same place. However, this is yet to be tested.


    I would happily help test this possibility!
    Scott Vandonkelaar Zero Latency - Inversion VR