Countdown template usable with image marker instead of the face
Currently, the Countdown template will trigger the countdown when the user taps while his/her face is detected on the screen.
I would like to combine the Countdown template and the Image Marker template so that the countdown is triggered when the user taps the screen when the image marker is found.
Is this possible?
Hi JAK,
You can make a few tiny changes to the CountdownController.js script to do this.
Open CountdownController.js and add this line somewhere at the top of the script:
This will add an input for your MarkerTracking component. Add your MarkerTracking component and assign it to this input in the inspector.
In the function animationTrigger(), somewhere around line 240, insert this at the beginning of the function:
This will make it so that the animation will only trigger if the marker is being tracked. Now just set the Animation Trigger setting to Tap and you'll be good to go.
Let me know if you need any more help with this!
Jacob