Cancel
Showing results for 
Search instead for 
Did you mean: 

ROTATE 3D OBJECTS

Creator
Creator

Hello Everyone,

Can anyone help?

Attached example model.

I need to rotate around the X axis two objects 1. PLAT1 is Graphics   S1 is object

The method will be activated by sensor control.

 

Thanks

SHIMON

3 REPLIES

Re: ROTATE 3D OBJECTS

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

First you need to setup the animation (3D-Attributes - Self animation - create rotation path).

 

for playing the animation you need two SimTalk commands:

 

<object>._3D.selfAnimations.<animationName>.schedule;
<object>._3D.selfAnimations.playAnimation;

 

see example

selfAnimation3d_tr3.gif

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: ROTATE 3D OBJECTS

Siemens Phenom Siemens Phenom
Siemens Phenom

You could also use an unnamed rotation animation. That might suit a simple rotation better since you don't need to create animation paths (and thus the SelfAnimation inheritance would remain untouched) for that:

 

<object>._3D.SelfAnimations.<animationName>.scheduleRotation(<startAngle>, <endAngle>, <angleVelocity>);
<object>._3D.SelfAnimations.playAnimation;

 

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Re: ROTATE 3D OBJECTS

Creator
Creator

Thank you very much,