Log in or register to post comments

Vuforia 3.0.9 cloud reco + video playback weird behaviour

January 28, 2015 - 4:44am #1

Hi,

 

I'm facing a really weird problem while trying to merge cloud reco and video playback sample applications. I started off working on the books sample and made an app for my requirements which played video in full screen on recognition and didn't use the Vuforia Video Playback features. Later I tried to implement it in the following way:

- I imported Video Playback sample into my Unity application.

- Converted one of the videos in the sample scene to a Prefab.

- Instantiate this prefab everytime a target is recognized and has a video in its json.

- Added PlayVideo script to ARCamera.

 

So far, so good. The video comes up on the target and plays in touch, but suddenly I found a really weird behaviour. The video stays on the target only if the left border of my target is not in camera view. As soon as the left border of the target comes in view, the video goes frenzy and either comes really close to the camera or rescales on its own. I couldn't debug this because Video Playback doesn't support Play Mode yet, but I'm attaching a couple of screenshots just ot make myself more clear. In one image, where the video plays on the image, you can see that the left end of the image is not in view, while in the next image (which apparently is a black image), the entire image target is in view. I can see that the video is playing because the audio keeps playing and the screen changes color as if a video is being played. As soon as the video ends, everything goes back to normal and the video prefabs comes over the target in its original scale and position, but on touching it again, the same behaviour occurs. Any leads to this one?

P.S. This is the most weird behaviour I've seen in my 4 year experience with Vuforia :D

 

Regards

Parth

Vuforia 3.0.9 cloud reco + video playback weird behaviour

January 28, 2015 - 10:00am #2

Okay, after hours of debugging, I finally figured out the problem. For those of you who happen to encounter this issue, I'll post how I managed to solve it. My scene had a UI panel as a child of the cloud reco object and I was trying to zero out its position at runtime (which allows me to drag the panel anywhere on the scene and a small script would take care of the positioning when the scene is loaded). But Vuforia seems to have a few bugs with the new Unity UI, so when I removed the script which did my positioning, the video worked perfectly. Hope this helps.

 

Regards

Parth Darji

Log in or register to post comments