1
\$\begingroup\$

My game uses Vuforia pos and ground plane tracking.

During gameplay players are given the option to watch a video to gain additional health.

When 'No' is chosen gameplay resumes fine. However when 'yes' is chosen Vuforia tracking is lost during the video and afterwards all gameobjects are locked in a static position in relation to the AR camera.

Is there anyway to maintain pos tracking during the video?

\$\endgroup\$
  • \$\begingroup\$ No when you get an ad the activity is pushed to the background. I don't know if you can push some code on a different thread. You might want to figure that out. \$\endgroup\$ – Sidar Mar 8 '18 at 0:41
0
\$\begingroup\$

I would create a script that listens for when the yes button is pressed. There i would turn off mesh renderers, character controllers, etc. And when the ad ends and tracking is resumed vuforia will turn those back on. If you want to turn off more than what vuforia controls, then you could use the vuforia trackable behaviour and stick them inside of OnTrackingFound and OnTrackingLost. I normally take all that code and stick it inside of one of my own classes.

Good luck.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.