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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How change rotation using JS

Velkumar
18-Opal

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
InfinityX
14-Alexandrite
(To:Velkumar)

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.html%23

2)

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

 

 

 

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

InfinityX
14-Alexandrite
(To:Velkumar)

can you please elaborate the exact issue you are facing. 

why you want to rotate by model item?

what you want to achieve here?

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.

InfinityX
14-Alexandrite
(To:Velkumar)

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

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

InfinityX
14-Alexandrite
(To:Velkumar)

Yes

Hello @RolandRaytchev ,

 

I saw your community post.

 

Could you help me with this ?

 

/VR

Top Tags