I just downloaded the newest Unity plugin but I would like to know what's the best procedure to upgrade an older project with the new SDK. It seems to me that things have changed in terms of scripts, for example I get the error in CloudTracker.cs:
The type or namespace name `IClientTracker' could not be found. Are you missing a using directive or an assembly reference?
I noticed that CloudTracker is no more a .cs file but it's inside the WikitudeUnityPlugin.dll.
Thanks for letting me know.
A
Alexandru Florea
said
over 7 years ago
Hi,
Yes, the update is a major change in the API. Please take a look at the documentation page, specifically the migration guide and the client recognition guide. The main point is that before the dll contained an abstract classes named IClientTracker/ICloudTracker/ITrackableBehaviour that had to be derived from and added to the scene. Now the dll contains equivalent concrete classes named ClientTracker/CloudTracker/TrackableBehaviour that can be added directly to the scene. All the methods that were abstract before are now UnityEvents that are visible in the editor and can be subscibed to. You can also take a look at the example application to see how the scenes are set up.
Best regards,
Alexandru Florea
R
Robin Di Capua
said
over 7 years ago
Thank you for your answer! Ok I managed to migrate my project, thanks! The tracking is SO MUCH BETTER! Much more stable than before.
R
Robin Di Capua
said
over 7 years ago
Mmm...ok that's weird...it's actually not the case anymore. So weird, when I rebuilt the project the first time after migrating to the new version of the plugin the trigger was really super stable, now I did a new built (because I tried the example cases before and I needed to launch my scene again at launch) and it's back like before, as soon as I move a bit the phone the tracker gets lost very easily and I have my model appearing/disappearing unless I move my device VERY slowly.
A
Alexandru Florea
said
over 7 years ago
Hi,
It is very strange indeed. Can you please make sure that you are testing the new version and not the old one by accident? Maybe by adding logs or changing the augmentation in some obvious way? Or maybe check if the changes made when migrating project were not saved or were reverted in some way?
Kind regards,
Alexandru
R
Robin Di Capua
said
over 7 years ago
No it's the correct project. But one thing I noticed is that one must really move the device very slowly else the tracking gets lost easily. Maybe when I tried it the first time I was panning very slowly without realizing it. I noticed that people tend to move their iPad or iPhone quite frantically when scanning triggers and so they tend to loose the camera focus quite easily. Is there a way to soften this problem somehow? Thanks
R
Robin Di Capua
said
over 7 years ago
Hi there,
I found the issue. Basically I was visualizing an object containing a 3D model and a 3D UI placed on its right. The fact that the UI was placed on the right made it so that its 3D panel would exit the camera frustum quite easily and I think that's why then the whole tracker object was hidden often. I'm not sure why that's the case though, the trigger was always visible on camera. Once I disabled the 3d UI the whole marker was much more stable. Do you somehow check if the visualized model is inside the camera frustum at all times?
A
Alexandru Florea
said
over 7 years ago
Hi,
I would like to look into this issue, because it shouldn't matter, as long as the target image is visible to the camera. It might be a problem with Unity not handling frustum culling very well with our camera. Would it be possible for you to send a small sample project where we can reproduce this? Thank you.
Kinds regards,
Alexandru
R
Robin Di Capua
said
over 7 years ago
Hi there,
I can't send the current sample at the moment for corporate reasons. That said I simply visualized a 3d model together with a 3D UI on its right and they were both childs of the tracker object container.
A
Alexandru Florea
said
over 7 years ago
Hi,
I'll try to reproduce it and find what the problem is. Maybe in the mean time you can try to display the 3D UI with a separate, static camera, by converting the augmentation position from the wikitude camera space to the new one.
R
Robin Di Capua
said
over 7 years ago
Hi Alexandru,
I replaced the 3D UI with a 2D one. Now the tracking works much better, but compared with other techs I still think it gets lost too easily when moving the device. Most people use the device moving it very fast and with steep angles which of course doesn't help the recognition.
A
Alexandru Florea
said
over 7 years ago
Hi Robin,
Is there any difference in the quality of tracking between the sample and your app? You can also check if the targets you are using are suitable for tracking. In the target manager, the number of stars on each target will indicate this.
R
Robin Di Capua
said
over 7 years ago
I'm using a trigger with 3 stars so that should not be the issue. Could it be that the narrow 34 degrees view angle set on the Wikitude cameras make it easy to loose the tracker if going outside the 34° frustum?
A
Alexandru Florea
said
over 7 years ago
The FOV value in the camera inspector is not used. At runtime, the plugin provides a custom projection matrix that overrides it because it needs to match what the actual physical camera is seeing. The target should only be lost when exiting the field of view of the physical camera, but blurry frames caused by rapid movement will also cause issues, unfortunately. Phone performance and camera quality will help with this.
Robin Di Capua