Unity - Text Meshes not disabling Mesh Renderer

September 16, 2015 - 11:52am #1

Just realized this last night, they never disable unlike all other objects in my Vuforia scene. If they are visible at start of experience I see them floating before the target has been reco'd, and if i lose tracking they freeze in place on the screen.

Is this a known issue or is there a workaround, I've googled and couldn't find any mention.

Unity - Text Meshes not disabling Mesh Renderer

September 17, 2015 - 11:48am #5

Text mesh is indeed a child of the image target - what's strange is that some of the TM's (that I have animated doing something else) apparently ARE disabling, I just noticed late last night. I don't know what I did to them that is different, other than animate their opacity at some point during the experience. I'll futz with it some more and report my results back in this thread over the weekend. Thanks again for your help-

Unity - Text Meshes not disabling Mesh Renderer

September 17, 2015 - 10:27am #4

I can see in your fourth image when you lost the target that your Text Mesh Renderer is enabled. It seems your Text Mesh object is not a child of the image target, otherwise the renderer would be disabled when you lose your target.

You can create a new script containing everything from the DefaultTrackableEventHandler, attach it to your imageTarget instead of the DefaultTrackableEventHandler and then get a reference to your TextMesh object, get the renderer and disable it when you lose the target, on the script you can find this in OnTrackingFound().

Unity - Text Meshes not disabling Mesh Renderer

September 16, 2015 - 11:31pm #3

Hi, thank you for responding to my issue.

 

Image 1 - shows I have the eventHandler linked to my target

http://www.texturemonkey.com/temp3/vua01.jpg

 

Image 2 - here's how the script looks (I haven't changed it at all)

http://www.texturemonkey.com/temp3/vua02.jpg

 

Image 3 - "text" is my Text Mesh (nothing fancy going on), and "Cube" is a generic cube. Here they are shown during target focus.

http://www.texturemonkey.com/temp3/vua03.jpg

 

Image 4 - same setup, target is moved out of view & focus is lost. Note the Text Mesh's renderer is still active (and cannot be disabled if i try to do it manually - it instantly re-enables). Cube, and everything else, is appropriately disabled

http://www.texturemonkey.com/temp3/vua04.jpg

 

Is there some setting I am supposed to adjust in the script, perhaps?

Unity - Text Meshes not disabling Mesh Renderer

September 16, 2015 - 12:51pm #2

Hi,

Most probably your image target has no DefaultTrackableEventHandler component, that is a sample script which handles this. Check that script in the sample apps.

Log in or register to post comments