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
10 years ago

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?

3 Replies

Replies have been turned off for this discussion
  • Yes, with Unity 5.1 VR support is built-in and you don't need the Oculus integration.
  • 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