Skip to main content
1-Visitor
June 5, 2019
Solved

Jumping into a specific Step after selecting from 2D-Widget List

  • June 5, 2019
  • 1 reply
  • 1767 views

Greetings Guys,

 

I have two selectable things in my 2D-Widget List in Vuforia Studio.

2019-06-05 16_00_47-Preview - Vuforia Studio.jpg

If I select Item 1 and press play, it starts with the animation from the beginning which is good.

Altogether my Sequence has 10 Steps. Item 1 is between Step 1 and Step 5. Item 2 is between Step 6 and Step 10.

How can I jump directly into Step 6 if i select Item 2?

At the moment the code looks like this:

$scope.setsequenceList = function(){
 $scope.app.params.sequenceList = [
 {
 "display":"Item 1",
 "value":"app/resources/Uploaded/l-Creo%203D%20-%20Abbildung%202.pvi"
 },
 {
 "display":"Item 2",
 "value":"app/resources/Uploaded/l-Creo%203D%20-%20Abbildung%202.pvi"
 }
 
 ]
}
$scope.setsequenceList();

Its like Item 2 is the same like Item 1. They both start in Step 1.

What do I have to change or rather to add?

 

 

I hope you can help. I would appreciate 🙂

Best answer by jmikesell

If you look at the Model widget you will see a value for CurrentStep. You will need to set this to the step you want to start on before you start playing the sequence.

 

So something like:

$scope.setWidgetProp('model-1', 'currentStep', 6);

1 reply

jmikesell1-VisitorAnswer
1-Visitor
June 14, 2019

If you look at the Model widget you will see a value for CurrentStep. You will need to set this to the step you want to start on before you start playing the sequence.

 

So something like:

$scope.setWidgetProp('model-1', 'currentStep', 6);