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
- BradleyNewmanProtegeOn a related note, I'm curious what the following code is for. If the tracker controls the position and orientation of the OVRCameraRig why does this code need to set the transforms of the eyes? If the eyes are children of the OVRCameraRig the eyes will be transformed along with the OVRCameraRig naturally in the scene object hierarchy, why the extra step here?
OVRCameraRig.cs
private void UpdateAnchors()
{
OVRPose leftEye = OVRManager.display.GetEyePose(OVREye.Left);
OVRPose rightEye = OVRManager.display.GetEyePose(OVREye.Right);
leftEyeAnchor.localRotation = leftEye.orientation;
centerEyeAnchor.localRotation = leftEye.orientation; // using left eye for now
rightEyeAnchor.localRotation = rightEye.orientation;
leftEyeAnchor.localPosition = leftEye.position;
centerEyeAnchor.localPosition = 0.5f * (leftEye.position + rightEye.position);
rightEyeAnchor.localPosition = rightEye.position;
} - TtakalaHonored GuestThere were separate check boxes for disabling rotation/position tracking in 0.4.2. I'm also missing these options, hopefully they will be added to the OVRCameraRig in the next version.
The following code is not working right now (the setter for isEnabled does not work as one would expect):
OVRManager.tracker.isEnabled = false; - vrdavebOculus StaffOVRManager.usePositionTracking and OVRTracker.isEnabled control whether the IR tracking camera affects the head position. If they are false, then we use the head model to infer the position based on the rotation. It sounds like you want to completely control the position and rotation of each eye camera, so you should probably replace the code in UpdateAnchors() with whatever your tracking system needs. For a future release, I've added a "PoseChanged" event where you could run this code without modifying OVRCameraRig.
- TtakalaHonored GuestHi vrdaveb,
Ah, so I had to set both OVRManager.usePositionTracking and OVRManager.tracker.isEnabled to false (the latter after the execution of OVRManager's Start-function), then the IR camera-based position tracking stopped. Only setting OVRManager.usePositionTracking=false wasn't enough, which I think is confusing.
Furthermore, if I set OVRManager.tracker.isEnabled=false, then OVRManager.tracker.isEnabled still returns true afterwards. I'm using OVR 0.4.4.
Ok, now I get what you mean with PoseChanged. Yeah, full control of position and rotation of the eyes would definitely help.
With DK1 and OVR 0.3 I was able to remove the rotation-based translation with the following:
oculusCamController.SetNeckPosition(Vector3.zero);
oculusCamController.SetEyeCenterPosition(Vector3.zero);
But it seems like this is not possible anymore. - TtakalaHonored GuestOne more thing: If I have both OVRManager.usePositionTracking and OVRManager.tracker.isEnabled set to false so that the position of the eyes is not updated by the Oculus infra-red (IR) camera, then the IR camera-based yaw drift correction is also disabled. We would very much like to have that enabled while not updating the eye positions with the IR camera.
- vrdavebOculus StaffWe're adding a callback that will allow you to filter the tracking pose in a future release. For now, please leave position tracking enabled and modify OVRCameraRig.UpdateAnchors() to subtract centerEyeAnchor.localPosition from all 3 anchors' local positions each frame.
- BradleyNewmanProtegeThe methods recommended no longer seem to work in Unity 5.3 due to the Unity built in VR support overriding any tracker rotation values you try and remove. Any recommendations for disabling the orientation tracker in Unity 5.3?
- vrdavebOculus StaffPlease see viewtopic.php?t=19863&p=308210#p308210. The event OVRCameraRig.UpdatedAnchors still works, but with a slight wobble due to TimeWarp. We are adding an option to OVRManager to globally disable tracking, but it won't be available within the next few weeks. For now, your best option might be to use Unity 4 and the legacy integration, where you can completely customize the tracking logic in OVRCameraRig.cs.
- akaHonored GuestWe were using a PhaseSpace active marker mocap system to track a DK2 in Unity 4 by disabling orientation tracking so that the PhaseSpace data could provide the head rotation and position This is necessary for freely moving about within the spatial volume we are working in.
We have also hit the issue with Unity 5 not supporting an option in OVRManager to globally disable tracking and are anxious to have this function so that we can resume work in Unity 5. What is the current ETA for the inclusion of this function? - vrdavebOculus StaffSorry, this is still on our radar but unlikely to ship before the end of March. Can you use the UpdatedAnchors callback for now?
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
- 6 months ago
- 3 years ago
- 2 years ago