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

How change rotation using JS

Pearl

How change rotation using JS

Hello, 

 

I have a model, when I try to change rotation of Z axis manually using transform arrow it changes X and Y axis also. I want to do this using JS, could any one tell me how to do this.

 

Thanks in advance.

 

Regards,
VR

8 REPLIES 8

Re: How change rotation using JS

yes its possible. solution is already given in help centre of vuforia. by simple modification in binding and Javascript its possible to achieve the desired solution. for reference links of help centre are attached below.

1)

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

2)

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

 

 

 

Tags (1)
Highlighted

Re: How change rotation using JS

Hi @InfinityX 

 

Thanks for your response. My problem is model item is inclined in some angle, so if I change Z axis rotation manuall/JS it transform into abnormal position. PFB image for reference

 

Img1.PNGImg2.PNG

 

Is there any way to over come this ?

 

Thanks in advance.

 

/VR

Re: How change rotation using JS

can you please elaborate the exact issue you are facing. 

why you want to rotate by model item?

what you want to achieve here?

Re: How change rotation using JS

The ModelItem is  shaft, I want to show the shaft as running i.e want to rotate shaft in Z axis. So when I change only Z axis rotation using JS it rotates in different/abnormal pattern.

Re: How change rotation using JS

May be the co-ordinate system of that shaft is not matching with global co-ordinate system of assembly. Because we have also faced the same issues while creating experiences. 

the solution is you need to  shift co-ordinate system of shaft to wherever you want according your requirement in creo parametric. then it will work

Re: How change rotation using JS

Hello @RolandRaytchev ,

 

I saw your community post.

 

Could you help me with this ?

 

/VR

Re: How change rotation using JS

Thanks for your response @InfinityX . In this post they used JS to rotate in some angle.

Re: How change rotation using JS

Yes

Announcements
Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection