Log in or register to post comments

Resetting image target detection

September 18, 2018 - 5:38am #1

Hello,

I am using Vuforia image target (with extended tracking) for a HoloLens app. When the image target is detected, I am disabling Vuforia detection  VuforiaBehaviour.Instance.enabled = false;. At the same time, I am skipping disabling of Renderer, Collider and Canvas in DefaultTrackableEventHandler.OnTrackingLost() in my overridden method so that detected model stays there.

Now, when I try to start Vuforia detection again VuforiaBehaviour.Instance.enabled = true, even before I look at the image target, DefaultTrackableEventHandler.OnTrackingLost() is triggered and the image target gets activated. And, I can see the model in exactly same position where it was visible earlier. In an ideal scenario, when I enable Vuforia detection again, it should scan for the image target to trigger the experience which is not the case here.

Is that because I have used extended tracking and HoloLens still keep track of that object? How can I reset or release that?

What is the best way to reset tracking in this approach?

Any help will be appreciated.

Thank you.

 

 

Resetting image target detection

September 20, 2018 - 9:56pm #4

I found a Vuforia function, that does, what you want to achieve:

Vuforia.TrackerManager.Instance.GetTracker<PositionalDeviceTracker>().ResetAnchors()

Resetting image target detection

September 19, 2018 - 10:20pm #3

Ok. Let me query the objects to see whether WorldAnchor is added to that GameObject. Since I am running the app after deploying to device, I have no option to see whether WorldAnchor is added to the object in Unity inspector.

I'll give a try and will update the thread.

Thanks,

Resetting image target detection

September 18, 2018 - 6:22am #2

As far as I know, the extended tracking is implemented using the worldanchors of the Hololens, so I assume you need to remove the worldanchor from the tracked object manually before starting to track again. Something like HoloToolkit.Unity.WorldAnchorManager.Instance.RemoveAnchor(anchoredGameObject);

Log in or register to post comments