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.
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?
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.
Thank you for your reply.
I am not trying to recognize multiple targets at once.
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)
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?
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 firstname.lastname@example.org (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.
Wikitude Pro 9.2
Android Device : Galaxy S8 (Android 8.0)
iOS Device : iPhone 6S (iOS 13.7)
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.
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.