Anim_R

Category: Animations
Since engine version: 3.0 OC

Description

The value depends on the rotation of the object. Upward rotation (0 degrees) is mapped to the value given by begin, and moves toward end when the object rotates clockwise, up to end after one revolution (360 degrees).

Syntax

array Anim_R(int begin, int end);

Parameters

begin:
Start of the interval.
end:
End of the interval. If end is chosen to be greater than begin then the value increases with clockwise rotation, otherwise it decreases.

Remark

See the animation documentation for further explanations of the animation system.

Example

PlayAnimation("Turn", 5, Anim_R(0, GetAnimationLength("Turn")), Anim_Const(1000));
Plays the animation "Turn" in slot 5 and superimposes any other potential animations in slot 5. The animation is synchronized to the object's rotation so that the full animation is played once per revolution.
See also: Anim_AbsX, Anim_AbsY, Anim_Action, Anim_Const, Anim_Dist, Anim_Linear, Anim_X, Anim_XDir, Anim_Y, Anim_YDir, PlayAnimation, SetAnimationPosition, SetAnimationWeight
Clonk-Karl, 2012-04