Math Functions Previous Next Random Number Functions

Chapter 24, Expressions
Vector Functions

Function Description
(expr1, expr2, expr3) Returns a vector composed of the evaluation of the individual component expression.
Dot (vector1, vector2) Returns the dot product of two vectors.
Cross (vector1, vector2) Returns a vector, the cross product of two vectors.
Length (vector) Returns the length of a given vector.
LookAt (targetPos,ObserverPos, AlignVector) Returns a rotation vector based on a target position, an observer position and an align direction vector.
Align (targetPos, alignVector, bankingAngle) Returns a rotation vector such that a designated axis of an object is aligned with the direction of the object's movement. The banking angle controls the rotation around the axis, in radians.
Distance (pos1, pos2) Returns the distance between the two points represented by the vectors pos1 and pos2.


Previous Next