Use the following functions to animate channels in a general way.
Returns a rotation vector such that a designated axis of an object is aligned with the direction of the object's movement. You can also bank the rotation around the axis. The result should usually be assigned to a rotation channel.
Syntax: | align(PosToFollow, [AxisToAlign], [BankingAngle]) |
Arguments: |
|
Example: | align(axis.position, (0,0,1), frame * PI / 8) returns a rotation vector that points the object's Z-axis in the direction of its motion while the rest of the axis rotates along this axis. |
Returns a rotation vector based on an object's position that points it towards a second moving object. The result should usually be assigned to a rotation channel.
Syntax: | lookat(TargetPos, ObserverPos, [AlignVector], [UpVector]) |
Arguments: |
|
Examples: |
|
Returns the value of a given expression at another point in time.
Syntax: | eval(Expression, FrameNumber) |
Arguments: |
|
Examples: |
|
Returns one of two values based on the result of a conditional test. You can nest multiple functions inside each other to handle multiple results.
Syntax: | if(Condition, TrueValue, FalseValue) |
Arguments: |
|
Examples: |
if(!(axis.position.x =>0 || axis.position.y =>0), 5, -5) if(!(axis.position.x =>0) && !(axis.position.y =>0), 5, -5) if(axis.position.x < 0 && axis.position.y < 0, 5, -5) if(axis.position.x < 0, if(axis.position.y < 0, 5, -5), -5) |
Returns a number from 0 to 1 representing a smooth S-curve transition between a given range of frames. All frames before the start frame are assigned 0 and all frames after the end frame are assigned 1. A start weight and end weight specify how the S-curve is formed.
Syntax: | ease(StartFrame, EndFrame, [StartWeight], [EndWeight]) |
Arguments: |
|
Examples: |
|
Returns a set of values representing a bell (normal distribution) curve over time. You can specify the centre frame number and height and width characteristics of the curve.
Syntax: | bell(CentreFrame, Height, Width) |
Arguments: |
|
Examples: |
|