Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Is it possible to disable all tracking?

Hi,
I've spend couple days trying to find a way to disable all tracking from the HMD(so extend display mode?), but could not get a working method so far. By all tracking i mean both position and rotation, where position is simple, current SDK provide that toggle directly.
I'm using Unity 5.4.0f1 as of today, and testing on both DK2 and CV1.

So far I've tried every method I could find via google and forums, nothing seem to work including tricks like "zero out" rotations each frame.
Using Unity's build-in camera system does not seem to allow any control of camera at all, and the OVR camera rig does not provide such function directly. I also tried the timewarp methods and it's not/no longer working.
For now I'm going to take a deeper look at the camera rig and see if i could come up with something.

Researched on this for days and saw all methods were for 0.6 and earlier, or everyone turned to argue about the "uncomfortable experience" by disabling the tracking, which is out of the scope in my situation.

For those of whom interested in providing evidence of "uncomfortable experience", I want to achieve this because I'm using external tracking system, which provides better information than the HMD's.
Having both the HMD and external tracking system makes the rotation "doubled".

I'm not sure if i should post this in Oculus forum or Unity's, so maybe I'd to create a duplication over there later today if it remains unanswered..

Thank you and everyone in advance.
Tagged:

Answers

  • cyberealitycybereality Posts: 26,156 Oculus Staff
    edited July 2016
    So, I would highly recommend NOT disabling head-tracking, as that will cause users to become uncomfortable. But if you must do it, see the code below.

    using UnityEngine;
    using System.Collections;
    
    public class DisableTracking : MonoBehaviour {
        private Camera cam;
        private Vector3 startPos;
    
        void Start () {
            cam = GetComponentInChildren<Camera>();
            startPos = transform.localPosition;
        }
    	
        void Update () {
            transform.localPosition = startPos - cam.transform.localPosition;
            transform.localRotation = Quaternion.Inverse(cam.transform.localRotation);
        }
    }
    Just put that script on an empty GameObject, and make the camera a child of that. If you have your own head-tracking solution, then create one more parent empty, and use your alternate tracker to control that.
    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
  • metal-crowmetal-crow Posts: 6
    NerveGear
    edited July 2016
    I'm trying to do the same thing in C++ (basically https://forums.oculus.com/community/discussion/comment/242286 but not unity), and haven't had any luck so far. I'd like to disable tracking instead of just having the quad move with the head rotation, because since i want this to be a realtime application any cpu time i can save i would like to.

    If someone could explain how to do this, preferably with a sample, that'd be incredibly helpful.

  • speeder84speeder84 Posts: 8
    EDIT: I made it and it was pretty easy, just the fact of being newbie with Unity makes it a little bit hard. DisableTracking.cs works correctly, and to make the camera a child of another object just take it in the hierarchy window and drag it to the object, as simple as that. Thanks to the Admin
  • speeder84speeder84 Posts: 8
    I'm tracking all this info for kind of similar applications, reading documentation about quaternion, if someone could explain with a sample i'd be incredibly helpful to make it a clear and fast way =). Regards

    EDIT: I made it and it was pretty easy, just the fact of being newbie with Unity makes it a little bit hard. DisableTracking.cs works correctly, and to make the camera a child of another object just take it in the hierarchy window and drag it to the object, as simple like that. Thanks cybereality
  • WerkschmiedeWerkschmiede Posts: 21
    NerveGear
    edited October 2016
    I´m not a coder! But i need to disable the native CV1 tracking and exchange it with TrackIR 5.
    May someone did this already? Special Unity Version avaible? Or is it possible to use the CAM for tracking roll,yaw, pitch and disable all HMD sensors?
  • Fuby1000Fuby1000 Posts: 18
    NerveGear
    While this works it doesn't seem to be "clean". Right now I'm using the CV1`s orientation, while I want to use a motion capturing system for the position (since I want to use extnsion cables so I can increase the area the CV1 works in). The position seems to be quite off, though. Could this problem be related to the code or the CV1? Or is it related to the mocap system?
  • roetkaroetka Posts: 6
    NerveGear
    I´m not a coder! But i need to disable the native CV1 tracking and exchange it with TrackIR 5.
    May someone did this already? Special Unity Version avaible? Or is it possible to use the CAM for tracking roll,yaw, pitch and disable all HMD sensors?

    Right now there doesn't seem to be a working solution to deactivate the tracking sensors (Gyro) of the HMD.
    I need this too, but currently got no working result for this.
  • LauraGlez168LauraGlez168 Posts: 2
    NerveGear
    Sorry I'm new to this development for Oculus Rift but I would like to know what kind of camera you used to be displayed in Oculus Rift. I use the OVRPlayerController but I still can not get the tracking completely disabled. I just want to always keep the camera in the same position. Somebody could help me?.
  • PARTYW00TPARTYW00T Posts: 8
    NerveGear
    edited June 2018
    speeder84 said:
    I'm tracking all this info for kind of similar applications, reading documentation about quaternion, if someone could explain with a sample i'd be incredibly helpful to make it a clear and fast way =). Regards

    EDIT: I made it and it was pretty easy, just the fact of being newbie with Unity makes it a little bit hard. DisableTracking.cs works correctly, and to make the camera a child of another object just take it in the hierarchy window and drag it to the object, as simple like that. Thanks cybereality
    I need your help. I'm trying to do exactly what you describe, as a consumer.

      I want to disable tracking on the hmd, and either link the camera to a tracked object a-la third controller for mixed reality filming or link it to positional data from driver4vr and rotational data from riftcat.

    could I make this happen with no experience dealing with unity?
  • PARTYW00TPARTYW00T Posts: 8
    NerveGear
    speeder84 said:
    I'm tracking all this info for kind of similar applications, reading documentation about quaternion, if someone could explain with a sample i'd be incredibly helpful to make it a clear and fast way =). Regards

    EDIT: I made it and it was pretty easy, just the fact of being newbie with Unity makes it a little bit hard. DisableTracking.cs works correctly, and to make the camera a child of another object just take it in the hierarchy window and drag it to the object, as simple like that. Thanks cybereality
    I need your help. I'm trying to do exactly what you describe, as a consumer.

      I want to disable tracking on the hmd, and either link the camera to a tracked object a-la third controller for mixed reality filming or link it to positional data from driver4vr and rotational data from riftcat.

    could I make this happen with no experience freaking with unity?
  • PARTYW00TPARTYW00T Posts: 8
    NerveGear
    speeder84 said:
    I'm tracking all this info for kind of similar applications, reading documentation about quaternion, if someone could explain with a sample i'd be incredibly helpful to make it a clear and fast way =). Regards

    EDIT: I made it and it was pretty easy, just the fact of being newbie with Unity makes it a little bit hard. DisableTracking.cs works correctly, and to make the camera a child of another object just take it in the hierarchy window and drag it to the object, as simple like that. Thanks cybereality
    I need your help. I'm trying to do exactly what you describe, as a consumer.

      I want to disable tracking on the hmd, and either link the camera to a tracked object a-la third controller for mixed reality filming or link it to positional data from driver4vr and rotational data from riftcat.

    could I make this happen with no experience freaking with unity?
  • VizualStudioVizualStudio Posts: 5
    NerveGear
    And a plus one for this from me for disabling the rotation\orientation tracking.

    I have spent far too long trying to resolve this.  The disparaging looks from the wife are now turning into comments of "are you still doing that!?"

    I have gone through the scripts and have been commenting out\changing references to rotation from true to false and still the orientation data is getting through to Unity.  As an aside, it does make we wonder how much functionality is supplied by these scripts.
    The script files I have been looking at are OVRManager.cs, OVRCameraRig.cs, and OVRPlayerController.cs

    For the sake of  my marriage, can someone please help me?...
  • MaciejCMaciejC Posts: 4
    NerveGear
    I am working with another tracking system as well and I also couldn't figure out how to disable the original rotation tracking unfortunately, so I let it go. I just offset the rotation at the beginning to keep the heading aligned to my master tracking system. Every 5 sec I compare the rotations and if the error is too big I slowly correct the offset.
Sign In or Register to comment.