Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Is it possible to keep the currently tracked / locked spatial target when switching / chaning the view programmatically (using $scope.app.fn.navigate('MyView))?
E.g. I have several views containing different parts of the entire device / machine and I have some UI controls which enable switching between them. Currently if I place a separate spatial target in each view, I have to re-acquire / re-enable tracking each time I switch to a new view.
I could do it all within the same view and just hide / show respective objects, but doing it in separate views seems way more convenient and flexible in terms of handling the JavaScript code and UI stuff related to the particular parts / subassemblies.
So, is it possible to retain currently active and tracked spatial target when switching programmatically (using $scope.app.fn.navigate('MyView)) between views?
Any other ideas / suggestions are much appreciated.
Solved! Go to Solution.
Hello Dimitry Tsarev,
When switching between Views, all Widgets and elements inside it, (in the Tree in Vuforia Studio) are loaded again.
I would mean that opening a View the first time or to reopen it from another View, it is the same.
We have a restart of this View.
In a such case, as a Target (Model, ThingMark ...etc...) are linked to a View, it is reinitialized.
The technical reason is about performance.
Model Target is tracking the environment and the real physical object in real time.
It is heavy for mobile CPU to do that.
By the way, if we have many Views to do that at the same time, even in background, it will kill performance of Vuforia View.
Stop to follow up a Model Target and restart it later, needs to reacquire it from scratch.
Because if we have lost the environment, we cannot garante a correct automatic restart of Model Target.
For example, if we stop to follow up a Model Target.
End user moves to another room and restart to the Model Target.
Program will not find the Model Target and it is lost!
In a such case, rescan Model Target is needed.
This is why it is automatic when switching a View that Model Target is stop.
Best regards,
Samuel
Hello Dimitry Tsarev,
When switching between Views, all Widgets and elements inside it, (in the Tree in Vuforia Studio) are loaded again.
I would mean that opening a View the first time or to reopen it from another View, it is the same.
We have a restart of this View.
In a such case, as a Target (Model, ThingMark ...etc...) are linked to a View, it is reinitialized.
The technical reason is about performance.
Model Target is tracking the environment and the real physical object in real time.
It is heavy for mobile CPU to do that.
By the way, if we have many Views to do that at the same time, even in background, it will kill performance of Vuforia View.
Stop to follow up a Model Target and restart it later, needs to reacquire it from scratch.
Because if we have lost the environment, we cannot garante a correct automatic restart of Model Target.
For example, if we stop to follow up a Model Target.
End user moves to another room and restart to the Model Target.
Program will not find the Model Target and it is lost!
In a such case, rescan Model Target is needed.
This is why it is automatic when switching a View that Model Target is stop.
Best regards,
Samuel