cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Camera view animation not working in Vuforia Studio.

writeratcdd
5-Regular Member

Camera view animation not working in Vuforia Studio.

I created animation sequence steps in Creo Illustrate. Playing steps showing changing the position of parts works in Vuforia Studio. However the step that changes the 3D model's orientation (to show the other side) does not work.

I have tried both the Record Camera and Capture Camera methods for changing the 3D model's orientation in Creo Illustrate. Neither works when I bring the .pvz file into Vuforia Studio. I'd greatly appreciate information on how to get this working.

8 REPLIES 8

Only the part movements are usable in Studio. Since this is AR you can't control the users perspective, they will need to walk to a different position to view the model from a different angle. You can rotate and move the 3DModel in the experience but you would need to do this independently from what you do in Illustrate.

 

Remember in AR the user controls the 'camera' position.

writeratcdd
5-Regular Member
(To:jmikesell)

Thank you for the quick and helpful reply.

"You can rotate and move the 3DModel in the experience but you would need to do this independently from what you do in Illustrate."

Do you mean only the user can do this in View? Or can I configure this in Studio in a way that plays for the user to show them something?

InfinityX
14-Alexandrite
(To:writeratcdd)

only user can do this

writeratcdd
5-Regular Member
(To:InfinityX)

Understood. Thank you.

jmikesell
15-Moonstone
(To:InfinityX)

This is not quite correct. If you don't "program" something in Studio the user can not move the model at all. There are ways to make an experience that will allow the user to move the model around but I have never seen anyone pull off a good UI, like something with drag, pinch and two finger rotate. You will end up having to use on screen buttons or sliders to move the model around.

 

If all you want is something like spin the model around to two or three positions in front of the user this would be easy to do with a little JS and could run on a loop or have pause play buttons.

writeratcdd
5-Regular Member
(To:jmikesell)

I have pop-up instruction steps with animation showing connecting cables to the 3D model's rear. When the user clicks the button to open the last step I want to rotate the 3D model to show the front panel LEDs that light up. Could you give an example of how to do this with JS?

writeratcdd
5-Regular Member
(To:writeratcdd)

http://support.ptc.com/help/vuforia/studio/en/#page/Studio_Help_Center%2FBeginner_JSInvokeFunction.html

 

The link above helped me get a button click to invoke a JS function to rotate the 3D model. However it appears to break the functionality of the rotation slider I set up for users. Also, I'm not sure how to rotate the 3D model back to its original position when the user closes the instruction pop-up. Creating another JS function seems to have stopped the original desired rotation from working. 

Hi @writeratcdd ,

 

I think the best approach will be to define the position - e.g. the rotation about Y model axis, via a parameter and let the script change your parameter - so the script could do some think like:

 

$scope.app.params['YROT']=0
//////////
$scope.TestClick = function () {
$scope.app.params['YROT']=parseFloat($scope.app.params['YROT'])+5.0
}

So here I will call the TestClick from a button click event :

2019-07-16_11-51-26.jpg

 

Then you can bind the value of the slider in 2 direction to the parameter so that change of the slider value will change the parameter and also  a  change pf the parameter will change the slider. 

 

2019-07-16_11-44-08.jpg

Then you can also bind the parameter value additional to the model Y rotation and test.

 

2019-07-16_11-56-29.jpg

 

Now a click of the button will change the rotation of the model but will also update the slider

Top Tags