Log in or register to post comments

Vuforia trackable behaviour change after update

July 27, 2018 - 8:01am #1

Hello everyone, 

just to let you know, I am not the most experienced developer, however I made an application for MS HoloLens which used to work perfectly fine until today.

The application is supposed to display a hologram on top of an image target, afterwards I'd stop the search for trackable images in order to activate the live stream option. This used to work easily and I could start and stop vuforia easily. Using:



TrackerManager.Instance.GetTracker<ObjectTracker>().Stop();



And the counter part respectively:

TrackerManager.Instance.GetTracker<ObjectTracker>().Start();

However, I update Vuforia to 7.2.23 and now everything shuts down completely, the hologram disappears and reappears with toggling Vuforia. 

Does anyone have a good idea of what can be done to solve the issue? 

I need to get access to the webcam for demonstrative purposes!

 

Note: 

 

World Center Mode = Device

Device Tracker        = Activate/Deactivated [doesn't change anything] 

 

 

To anyone thinking about my issue, thanks in advance!

 

Vuforia trackable behaviour change after update

July 30, 2018 - 1:42am #2

For anyone running into the identical issue:



The way to go around this problem which worked for me, adapt the DefaultTrackableEventHandler.cs. Within the void OnTrackingLost() change the enabled status from false to true. It should look something like this:



protected virtual void OnTrackingLost()

    {

        var rendererComponents = GetComponentsInChildren<Renderer>(true);

        var colliderComponents = GetComponentsInChildren<Collider>(true);

        var canvasComponents = GetComponentsInChildren<Canvas>(true);

        // Disable rendering:

        foreach (var component in rendererComponents)

            component.enabled = true;

        // Disable colliders:

        foreach (var component in colliderComponents)

            component.enabled = true;

        // Disable canvas':

        foreach (var component in canvasComponents)

            component.enabled = true;

    }

 

Good luck, hopefully it helps anyone out!

Log in or register to post comments