Start a new topic

App is shutdown during AR recognition.

Unity 2019.4.4f1

Wikitude Pro 9.2

Android Device : Galaxy S8 (Android 8.0)

iOS Device : iPhone 6S (iOS 13.7)



Hello,


I'm testing AR recognition by adding Custom UI to the Object Tracking - Extended Tracking Scene supported by Wikitude.


Only this code has been added to the Controller script, which is included by default in Scene.


When multiple targets were registered in one WTO file but the target was lost and the other targets were recognized, the target was not reset, so the code was added for target reset.

    public void OnObjectLost(ObjectTarget target) 
    {
        Tracker.gameObject.SetActive(false);
        Tracker.gameObject.SetActive(true);
    }

When AR recognition is performed, the tracker is reset after Target Lost and the application is shut down before another target is recognized.


I want to know the reason and solution for this problem.


Best Regards.



Hello,

that should actually work out of the box.

Could you provide a link to a test project so that I can have a deep dive into what's going on? You could also send it to support@wikitude.com (please don't forget to mention me and the forum post in the mail).
I think that would be the fastest way for resolving the issue.


Kind regards,
Gökhan

Hello,

Thank you for your reply.


I am not trying to recognize multiple targets at once.


image


image


Two targets, the left and right side of the car, were placed in one WTO file.

And I wanted to recognize both sides of a car.

But after first recognizing one side, it doesn't recognize the other.


I found two ways to recognize the other side.

One is to turn off the app and then restart. (CantChange.mp4)

One is to reset the tracker when the target is lost. (TrackerOnOff.mp4)


image


Tracker OnOff was able to get the desired result, but there was one problem.

If you reset the tracker after Target Lost and try to re-recognize it, the app shutdown. (RealCarShutdown.mp4)


The app seems to be overloaded when loading Targets again after Tracker OnOff.


How do I recognize other targets in the wto file during runtime without turning the tracker on and off?

mp4
mp4
mp4
(7.31 MB)

Hello,

In Professional Edition we only support tracking of one target at a time. In Expert Edition however you can track multiple targets in a target collection multiple times.

Coming back to your problem. There are multiple ways of going about this. The easiest would be to just create separate ObjectTrackers. Once the Target "B" is found, delete its ObjectTracker and activate a separate ObjectTracker with Target "C".

Or you could also deactivate the Tracker, set the Trackables TargetPattern to "C" and activate it again like you did in your code snippet. You would just need to adjust the TargetPattern.


Kind regards,
Gökhan

Hello,

I'm sorry. I don't have time to prepare the current video, so I'm going to explain it in detail again in writing


There are "B" and "C" targets in the "A" WTO file, and both "B" and "C" are well recognized when the target is first recognized. However, if you first recognize "B" and then try to recognize "C", the target that the tracker tries to recognize is still set to "B". Even within the same WTO file, it does not change from the first target.


So I was looking for a way, I found that I could recognize another target by turning the tracker's SetActive off and on once before recognizing another target.


But then, the app goes off when I try to recognize another target after lost the target and turning the tracker on and off.

Am I trying the wrong way?


Best Regards.


Hello,

Could you provide a video of the behaviour before you added these lines? I don't fully understand what you mean by the target not being reset.


Kind regards,
Gökhan

Login or Signup to post a comment