Log in or register to post comments

Button stays on The model stays on the screen when off the target

March 17, 2018 - 7:43pm #1

I have a problem with a button that stays on the screen when off the target. 

Image attached.

Additional Info

****************

Canvas Render Mode: World Space

Any help is greatly appreciated.

AttachmentSize
Image icon IMG_6490.PNG319.58 KB

Button stays on The model stays on the screen when off the target

March 19, 2018 - 11:53pm #3

Hello Strasza,

The extended tracking checkbox is not checked. 

With regards to your other question, yes, I am hiding the button through the function OnTrackingLost(), which is located in the script TrackableEventHandler.cs

This script is checked in the ImageTarget. When I set a breakpoint I confirmed that the app in facts gets into this function. The 3D animation dissapear when the target is lost, except the button. See below:

private void OnTrackingLost()

    {

        Renderer[] rendererComponents = GetComponentsInChildren<Renderer>();

        Collider[] colliderComponents = GetComponentsInChildren<Collider>();

        // Disable rendering:

        foreach (Renderer component in rendererComponents)

        {

            component.enabled = false;

        }

        // Disable colliders:

        foreach (Collider component in colliderComponents)

        {

            component.enabled = false;

        }

        Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " lost");

        mLostTracking = true;

        mSecondsSinceLost = 0;

    }

 

Thanks,

Marcelo.

Button stays on The model stays on the screen when off the target

March 19, 2018 - 10:29am #2

Hello marcelof00,

Are you disabling/hiding the button when the target is lost? Do you have extended tracking on?

Thanks,

Vuforia Support

Log in or register to post comments