Skip to main content
1-Visitor
December 1, 2020
Solved

Sequence animations on hololens

  • December 1, 2020
  • 1 reply
  • 11045 views

Hi,

I can't seem to get an animation to play on hololens 2.

 

I created the sequence in Illustrate 6.1 and used the code:

 

$scope.app.playModelStepPvz("Roller Handle","Figure 1","roller_handle",1,true) 

//////////////
//definition of the function
$scope.app.playModelStepPvz = function (pvz,sequence,modelName,step_number,play) {
 
//pvz file
//sequnece -sequnece name e.g. TestFigure1 - as shown in UI
//modelName - model name e.g. model-1 widget
//step_number - set this number to current step
//play true/false execute play for the model
 
 $scope.$applyAsync(()=>{$scope.setWidgetProp(modelName, 'src', '');}); 
 $timeout(function () {
 $scope.$applyAsync(()=>{$scope.setWidgetProp(modelName, 'src', 'app/resources/Uploaded/'+pvz +'.pvz');});
 },50);
 $timeout(function () {
 $scope.$applyAsync(()=>{$scope.setWidgetProp(modelName, 'sequence', '');}); 
 },50);
 $timeout(function () {
 $scope.$applyAsync(()=>{$scope.setWidgetProp(modelName, 'sequence', 'app/resources/Uploaded/l-Creo 3D - '+sequence +'.pvi');}); 
 },50);
 $timeout(function () { 
 $scope.$applyAsync(()=>{$scope.setWidgetProp(modelName, 'currentStep', parseInt(step_number));});
 if(play) //check if play should be applyed
 $timeout(function () {angular.element(document.getElementById(modelName)).scope().play(); }, 100)
 //angular.element(document.getElementById(modelName)).scope().play(); }, 100);
 }
 , 500);
};

 

 

Best answer by micah

We were able to solve the issue.

 

We found that hololens wasn't able to locate the PVI file within the PVZ the same way mobile devices do.

 

So to get around this we had to open the pvz file with 7zip, extract the pvi file and upload it within vuforia.

 

Another issue that was solved as a result of this workaround was the naming of figures created in Illustrate. We had to ensure that when we published the pvzs from Illustrate, the figures had to have unique names for the function to work.

1 reply

17-Peridot
December 2, 2020

Hello Micah,

 

I have some questions :

  • Is it an issue due to Javascript only ?
  • What appends when playing sequence by a simple binding in Experience for Hololens ?
  • Does Sequence is playing fine in a mobile Experience ?
  • Does the sequence is playing fine in Preview in Vuforia Studio ?
  • Do you have a Project to share where the issue is reproducible where we can work on it ?

 

Also, it might be possible to have a look to this thread about a similar issue :

https://community.ptc.com/t5/Vuforia-Studio/Sequences-does-not-work-on-hololens-using-javascript/m-p/655961

 

Best regards,

Samuel

micah1-VisitorAuthor
1-Visitor
December 2, 2020

It works with a simple binding to a 3D button.

21-Topaz I
December 7, 2020

I did not test it on the HoloLens 2. Please, let me know if the last code is not working  on the HoloLens 2, then I could test on this device - HL2