Search Unity

How to modify Vuforia Configuration > Device Tracker > Track device pose ?

Discussion in 'AR/VR (XR) Discussion' started by gnsx, Oct 31, 2018.

  1. gnsx

    gnsx

    Joined:
    Oct 31, 2013
    Posts:
    4
    I need to implement 2 modes in my application, 1st with TrackDevicePose off and the other one will be

    upload_2018-10-31_18-36-7.png

    Positional with fusion mode Optimize for Model targets and ground planes.

    upload_2018-10-31_18-38-5.png

    Question: Is there a way to programatically (C#) turn this feature on/off in realtime or via changing scenes?
    Cannot seem to find any examples of setting the config.
     
  2. gnsx

    gnsx

    Joined:
    Oct 31, 2013
    Posts:
    4
    Step 1 Enable positional tracking by default
    Step 2 Track State and enable/disable using the below.

    Source
    Code (CSharp):
    1. PositionalDeviceTracker pdt = TrackerManager.Instance.GetTracker<PositionalDeviceTracker>();    
    2. if( pdt != null && pdt.IsActive )
      
    3. {
    4.      //pdt.Stop();
    5.      //pdt.Start();
    6. }
     
    Last edited: Nov 6, 2018
    Sancejas likes this.