Log in or register to post comments

If no Image Target found show Message

September 15, 2020 - 6:07am #1

Hello I am quite new to Vuforia.

For my project I need to show a message on the screen, if there is no current Image Target found.

 

Also if you know if there is a way when there are 2 Image Targets tracked simultaneously to just show the Model of the newest tracked Image Target.

 

Thanks for your help!

If no Image Target found show Message

September 15, 2020 - 11:35pm #2

Hi,

create a UI text and drag it into the OnTargetFound() and OnTargetLost() function of your image targets. OnTargetLost() select Text -> string text and write your message in the string field and OnTargetFound() write nothing. (See image attached)

For the second question: drag model of the ImageTarget in  OnTargetFound() and select GameObject -> SetActive and set it true. Drag all other models in models in OnTargetLost(), also select SetActive and set it false.(See image attached)

AttachmentSize
Image icon Capture.JPG58.08 KB
Log in or register to post comments