Skip to main content
Up and Coming
June 3, 2015

Problem with using sensor fusion data in newer SDK's

Since SDK 0.5 I've been getting weird behavior where the sensor fusion data flips, so looking down registers as looking up and tilting my head to the left makes the player go right instead of left.


head_tilt = OVRManager.display.GetHeadPose(0.0f).orientation;
head_tilt.ToAngleAxis(out head_tilt_angle, out head_tilt_vector);

...

if (head_tilt_vector.x < -0.92f) flyangle = ((Mathf.Abs(head_tilt_vector.x * 6.0f) * (Time.deltaTime * Being_a_Bird_Simulation_Rate));// * speedmultiplier



It works normally sometimes, but sometimes it's reversed. I'm thinking about adding a menu option to flip all the reactions to the data in the event that the players Rift sensor data becomes flipped. The head tracking in the scene works normal as you would expect, but the sensor data gets flipped. Is there a better way to access this information than with GetHeadPose?
    This topic has been closed for replies.

    3 replies

    moltonAuthor
    Up and Coming
    June 10, 2015
    "Cyberreality" wrote:
    Try checking VR.InputTracking

    maybe this is a better method for input that does not have the same problems. It's a function of Unity, not an OVR thing like GetHeadPose http://docs.unity3d.com/ScriptReference/VR.InputTracking.html
    Inspiring
    June 10, 2015
    Yes, with Unity 5.1 VR support is built-in and you don't need the Oculus integration.
    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
    moltonAuthor
    Up and Coming
    June 11, 2015
    I'm not using unity 5 becuse it makes my game,mostly my shaders, not work anymore. This is not available in unity 4? Is there any other way of accessing this data besides GetHeadPose or unity's vr functions? Thanks