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

<vizact>.spinTo

Create an action that will animate an object spinning to a given orientation

<vizact>.spinTo(  
quat = None # Keyword argument
euler = None # Keyword argument
axisAngle = None # Keyword argument
point = None # Keyword argument
beginQuat = None # Keyword argument
beginEuler = None # Keyword argument
beginAxisAngle = None # Keyword argument
speed = None # Keyword argument
time = None # Keyword argument
mode = viz.ABS_PARENT # Keyword argument
interpolate = None # Keyword argument
)  
quat = None
[x,y,z,w] quaternion rotation to spin to
euler = None
[yaw,pitch,roll] euler rotation to spin to
axisAngle = None
[x,y,z,degree] axis-angle rotation to spin to
point = None
[x,y,z] point to spin to
beginQuat = None
Specifies the beginning quaternion to spin from. If all begin values are None, the objects current rotation will be used.
beginEuler = None
Specifies the beginning euler to spin from. If all begin values are None, the objects current rotation will be used.
beginAxisAngle = None
Specifies the beginning axis-angle to spin from. If all begin values are None, the objects current rotation will be used.
speed = None
The speed to spin to in degrees/second
time = None
The number of seconds to spin
mode = viz.ABS_PARENT
The transform mode to use when rotating the object
interpolate = None
The interpolation method to use when performing the action. Can be one of the following interpolation methods, or None to use linear.

Interpolation method

vizact.linear

Linear interpolation. Animation will occur at a constant speed.

vizact.cubic

Cubic interpolation. The default control points are 0.1 and 0.9, which causes a slight easing in and out of the animation. You can specify different control points by creating an instance and passing the values into the constructor (e.g. vizact.cubic(0.1,1.1))

vizact.easeIn
vizact.easeOut
vizact.easeInOut

An alias for quadratic easing.

vizact.easeInStrong
vizact.easeOutStrong
vizact.easeInOutStrong

An alias for quintic easing.

vizact.easeInQuadratic
vizact.easeOutQuadratic
vizact.easeInOutQuadratic

Use quadratic (x^2) easing when going in and/or out of animation.

vizact.easeInCubic
vizact.easeOutCubic
vizact.easeInOutCubic

Use cubic (x^3) easing when going in and/or out of animation.

vizact.easeInQuartic
vizact.easeOutQuartic
vizact.easeInOutQuartic

Use quartic (x^4) easing when going in and/or out of animation.

vizact.easeInQuintic
vizact.easeOutQuintic
vizact.easeInOutQuintic

Use quintic (x^5) easing when going in and/or out of animation.

vizact.easeInSine
vizact.easeOutSine
vizact.easeInOutSine

Use sinusoidal (sin(x)) easing when going in and/or out of animation.

vizact.easeInExp
vizact.easeOutExp
vizact.easeInOutExp

Use exponential (2^x) easing when going in and/or out of animation.

vizact.easeInCircular
vizact.easeOutCircular
vizact.easeInOutCircular

Use circular (sqrt(x)) easing when going in and/or out of animation.

vizact.backIn
vizact.backOut
vizact.backInOut

Back up in opposite direction when going in and/or out of animation.

vizact.bounceIn
vizact.bounceOut
vizact.bounceInOut

Bounce when going in and/or out of animation.

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 to the axis-angle rotation [0,1,0,90] at 90 deg/sec.
action1 = vizact.spinTo(axisAngle=[0,1,0,90],speed=90)

# Spin an object to the [90,0,0] euler rotation in 2 seconds
action2 = vizact.spinTo(euler=[90,0,0],time=2)