Search Unity

Resolved MRTK Tooltip text lost after Vuforia loses tracking

Discussion in 'AR' started by unity_C53D32DBF9FDA2C88024, Mar 31, 2022.

  1. unity_C53D32DBF9FDA2C88024

    unity_C53D32DBF9FDA2C88024

    Joined:
    Feb 11, 2022
    Posts:
    2
    I am making a training software in AR using Hololens 2 with MRTK and Vuforia. Different training steps include different tooltips attached to images tracked by Vuforia.

    Example: I have a marker called RobotTarget which has a Tooltip attached to it. The tracking mode is Tracked or Extended Tracked because it's needed to remember it's position. See the image below:
    upload_2022-3-31_11-51-18.png

    During the workflow, I change the visibility of the marker by SetActive(false)/SetActive(true). This works, the position is the same whenit was detected, but there is a problem of the blue plate being blank after setting the RobotTarget game object to active (so the text is not visible). The text becomes visible again when Vuforia detects it from close.
    Blank label:
    upload_2022-3-31_11-43-45.png

    Any ideas how I can make it work so also the text is visible when setting the game object to active?
     

    Attached Files:

  2. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
  3. unity_C53D32DBF9FDA2C88024

    unity_C53D32DBF9FDA2C88024

    Joined:
    Feb 11, 2022
    Posts:
    2
    Thanks for the recommendation!

    In the end I found the problem. It was related to the SetActive() function being used on the Vuforia Image Target game object (RobotTarget in the example). Instead, I only made active/inactive the children of the Image Target. This way the text appears as expected.
    So, in short: don't deactivate/activate the Vuforia Image Target game object, but only its children.
     
  4. Jananiravi

    Jananiravi

    Joined:
    Aug 19, 2022
    Posts:
    1
    Can you please Explain Its a Vuforia MRTK OR Microsoft MRTK ?