Log in or register to post comments

Script is executed before detection of image target

September 13, 2019 - 2:02am #1

Hi, 

I have image target and one empty game object as child of this image target. This child empty object has one script attached which I want it to get executed when the target is detected. 

But, As soon as I start the scene the script is getting executed before I detect the image. Any way to fix the behavior?

Regards,

Meghaksh

Script is executed before detection of image target

September 13, 2019 - 2:38am #2

Hi,

Without seeing the script it is hard to pinpoint the issue :) however my assumption is that you written the instructions in Start() or Update() part of the script, this means that the script is called at start or every frame.

You need to define a variable or bool tied to the trackingstatus of the imageTarget.

We have something similar setup in our Core Samples, regarding an animation. Please have a look at Scene: 3-MultiTargets; Script: MultiTargetTrackableEventHandler.cs

Thank you.

Vuforia Engine Support

Log in or register to post comments