NoveltyML reference > Object traits > AnimateRotation

<AnimateRotation>

Animates an object's rotation value.


Attributes

Attribute Description
from Initial value
to Target value
interval Length of animation
offset Offset of animation
mode Animation mode
reverse Reversing animation?
preview Preview in editor?


from [angle]

Initial value. Default is 0.

Example:
from = "0.0"


to [angle]

Target value. Default is 0.

Example:
to = "1.0"


interval [float]

Length of animation in seconds. Default is 1 second.

Example:
interval = "5"


offset [float]

Animation offset in seconds.

Example:
offset = "0.5"


mode [string]

Sets the animation mode. Determines how the animated value is calculated. Default is "linear"

Value Mode
"linear" Linear interpolation
"curve" Sine curve
"sqrt" Square root
"squared" Squared

Example:
mode = "curve"


reverse [bool]

When set to true, the animation will "bounce back" and play backwards during the second half of the animation.

Example:
reverse = "true"


preview [bool]

When set to true, this trait will animate in the Novelty editor. Default is false.

Example:
preview = "true"


Example

<Traits>
	<AnimateRotation interval="2" from="-45d" to="45" mode="curve"/>
</Traits>

Back to top