Forum Discussion
BradleyNewman
11 years agoProtege
Way to disable orientation tracking? [0.4.3]
I'm using a motion capture system to track both the position and orientation of the DK2 and I'm wondering if there is a good way to disable orientation tracking with the 0.4.3 SDK? Would be nice to see a future feature that includes separate check boxes for disabling position and/or orientation tracking.
12 Replies
Replies have been turned off for this discussion
- dbuckHonored GuestThis is one of the blocking issues with our Gear app, we're unable to update to the latest SDK's until this is fixed, and unable to publish updates with the previous SDK's.
To throw another wish at the feature. - AnRaElHonored GuestAny updates since then? I'm using Unity 5.5.1 + Oculus Unity Utilities 1.10.0 and targeting GearVR. What I want to achieve is to read a head orientation and transform OVRCameraRig to a completely different rotation and position based on this information. To be more specific, I'd like to implement a rotation around a pivot point and look at this pivot point all the time.
What I tried to do is parenting OVRCameraRig to a desired anchor object, disabled OVRManager position tracking and IPD position tracking, even commented OVRCameraRig.UpdateAnchors() (except the event call) to avoid anchors change by OVR scripts. Every frame I forced local positions and rotations of all anchor objects under TrackingSpace to zero values in two places (yes, this excessive): in OVRCameraRig.UpdateAnchors event handler and in LateUpdate().I read the HMD orientation info from OVRManager.tracker.GetPose().orientation and do all necessary calculations then update OVRCameraRig's anchor position and rotation.In Unity Editor it works as expected, but on a device I see a different picture and orientation is absolute, while camera world position is not changing. What I'm missing in this scenario?
I'd appreciate any help because I'm fighting with this task for several days with no luck.
EDIT: I forgot to mention that I also commented a bug fix in OVRCameraRig.Update() function:
if (!correctedTrackingSpace)
{
//HACK: Unity 5.1.1p3 double-counts the head model on Android. Subtract it off in the reference frame.
var headModel = new Vector3(0f, OVRManager.profile.eyeHeight - OVRManager.profile.neckHeight, OVRManager.profile.eyeDepth);
var eyePos = -headModel + centerEyeAnchor.localRotation * headModel;
if ((eyePos - centerEyeAnchor.localPosition).magnitude > 0.01f)
{
trackingSpace.localPosition = trackingSpace.localPosition - 2f * (trackingSpace.localRotation * headModel);
correctedTrackingSpace = true;
}
}So anchors from OVRCameraRig are not updated in my code anymore and I force them to identity rotations and zero positions in Update() and LateUpdate() cycles, but somehow they are constantly overriden.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 11 months ago
- 4 years ago
- 2 years ago
- 2 months ago