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.
relangle relangle (point1, point2, delta1, delta2): returns the angle between two vectors (point1,point2) and (point1+delta1,point2+delta2). All parameters are 2D vectors.This is used for implementing rotation tracking.
relscale relscale (point1, point2, delta1, delta2): returns the ratio between the length of vector (point1+delta, point2+delta2) and (point1, point2).All parameters are 2D vectors.This is used for implementing scale tracking.