Vizard 7 » Command Index » Vizard modules » vizact » <vizact>.spin
7.6

<vizact>.spin

Create an action that will animate an object spinning

<vizact>.spin(  
[x,y,z]  
speed  
duration = FOREVER  
)  
[x,y,z]
The axis the object should spin around.
speed
The speed at which the object should spin, in degrees per second.
duration = FOREVER
How long the object should spin, if this is viz.FOREVER then it will spin forever.

Remarks

After you have created the action you can add it to any object as many times as you want.

Return Value

An action that can be applied to any <node3d> object

Example

# Spin an object around the y axis at 90 deg/sec for 5 seconds.
spinAction = vizact.spin(0,1,0,90,5)

object.addAction(spinAction)