Skip to main content
Up and Coming
August 13, 2014

DK2 Initial Pos

Hi,

I'm just wondering if there is an official word on the initial position for the DK2's positional tracking? Is the 'zero' local position of the OVRCameras set when the Oculus is plugged in, per when the game is launched or is it a constant global from the camera (i.e always 3 foot away from the camera in real world). I assumed it was global space but I'm getting inconsistent behaviour? Not sure if this is a problem in software or something I've overlooked?

Thanks for the help!
    This topic has been closed for replies.

    7 replies

    Up and Coming
    August 13, 2014
    From the docs:

    By default the tracking origin is located one meter away from the camera in the direction of the optical axis but with the same height as the camera. The default origin orientation is level with the ground with the negative z axis pointing towards the camera. In other words, a headset yaw angle of zero corresponds to the user looking towards the camera.

    This can be modified using the API call ovrHmd_RecenterPose which resets the tracking origin to the headset’s current location, and sets the yaw origin to the current headset yaw value. Note that the tracking origin is set on a per application basis and so switching focus between different VR apps will switch the tracking origin also.
    Up and Coming
    August 14, 2014
    That's how it is in In DerGrosse Gottlieb, the zero position is directly in front of the camera, about 3 feet back. That seats you in the chair at the start. If I start the game in any other position, I won't be in the chair and have to press spacebar to reset. However, that is not the case with the 0.4.1 oculus world demo. My starting eye position i.e. the zero local position is always about 2 feet back from the IR camera and offset about 1 foot to the right. If I start the demo with the hmd in any other place the view jumps to the actual location of the HMD (relative to that local zero) as soon as the camera syncs.
    GA-Z97X-gaming gt; i5-4670k; Nvidia780Ti; 16GB PC3-17066; win7-64 bit; DK2
    Up and Coming
    August 14, 2014
    Ok, so from my understanding the final local-position of the Unity Cameras is the actual real-world global position of the Oculus in relation to the IR Cam. The orientation looks spot on and always seems to be consistent but I do find I get inconsistencies with the pos tracking (sometime too low, sometimes too high). Looks like grodenglaive has something similar, I'm also running 0.4.1.

    I'll look into ovrHmd_RecenterPose, maybe a hard reset when the game starts up is the way to go.
    Creative Director of Private Eye - A cinematic, neo-noir thriller for the Oculus Rift, where voyeurism meets mystery, played out against a 1950's New York city backdrop. Official Site: http://www.privateeyevr.com
    Up and Coming
    August 26, 2014
    Hi,
    I'm having an issue with this.

    I'm trying to reset the position of the headset at the start of my level. (it's very important that all players start in the exact same in game location)

    I can't see how to access the API call ovrHmd_RecenterPose in Unity. What library does it belong to?

    Thanks,
    -Matt
    ezone
    Up and Coming
    August 26, 2014
    Try adding something like this (press RETURN to reset the view):


    void Update () {
    if (Input.GetKey(KeyCode.Return) ) {
    print("Reset Orientation: " + OVRDevice.ResetOrientation() );
    }
    }
    Simon Edis - Ezone.com
    Up and Coming
    August 27, 2014
    Worked Great Thanks!
    New Participant
    November 5, 2014
    For anyone trying to fix this in the DK2 SDK 0.4.3, and disabling "ResetTrackerOnLoad" not working you can fix this by adding this line on the OVRDisplay constructor :

    public OVRDisplay() {
    if(OVRManager.instance.resetTrackerOnLoad)
    RecenterPose();
    ...