Reputation: 623
i'm working on a setup for the Oculus Rift DK2 with a bigger tracking area. Disabling the position tracking is no problem. But I am not able to disable the gyroscope. I'm using the OVRCameraRig prefab. I tried to disable the function
UpdateAnchors();
in the Update() function. But the rotation is still updated. I went through all the other scripts of OVR and disabled several functions, but the the roation-update by gyro is still working.
I found a solution here OVR wiki but I can not find the setOrientation() function...
Any ideas? Thanks!
Edit: Unity v5.2.3f1, Oculus Utilities v0.1.2.0, OVRPlugin v0.1.4.0.
Upvotes: 0
Views: 1652
Reputation: 21
These two techniques are suggested on the Oculus forums:
Add to the end of UpdateAnchors() in OVRCameraRig.cs:
trackingSpace.FromOVRPose(centerEyeAnchor.ToOVRPose().Inverse());
Add in an Awake function and set this script to execute first:
OVRPlugin.rotation = false;
I tried both in a clean project with the Oculus Utilities v0.1.2, Unity 5.1.2p3, and Oculus Runtime 0.6. The first created a strobing effect which wasn't acceptable and the second didn't work at all. Maybe it will work for you with a newer version of Unity.
I also tried hacking it by overriding the camera's rotation to zero in Update, LateUpdate, and EndOfFrame but that did not work either. Maybe the Unity order of events can be manipulated to solve this.
Upvotes: 2