Math - Vectors
28 scripting commands. Also as Markdown for agents.
- matrixMultiplyReturns resulting matrix from the multiplication of two matrices. First matrix must be of the size n × k, while the second must be of the size k × m,…
- matrixTransposeReturns transposed version of the given matrix. The matrix is an Array of rows. Each row is an Array of corresponding column values for the row. The…
- setVectorDirSet object's direction vector. Up vector will remain unchanged.
- setVectorDirAndUpSets orientation of an object. The command takes 2 vector arrays, one for vectorDir and one for vectorUp.
- setVectorUpSet object's up vector. Direction of the object remain unchanged. Default object's vectorUp is [0,0,1].
- vectorAddAdds two arrays of numbers. Replaces BIS_fnc_vectorAdd.
- vectorCosCosine of angle between two 3D or 2D vectors.
- vectorCrossProductCross product of two 3D vectors.
- vectorDiffSubtracts one 3D vector from another. (vector1 - vector2)
- vectorDirReturns an object's direction vector in world space.
- vectorDirVisualReturns an object's direction vector in world space and render time scope.
- vectorDistanceReturns Euclidean distance between two points.
- vectorDistanceSqrSquared distance between two 3D vectors.
- vectorDotProductDot product of two 3D vectors.
- vectorFromToUnit vector, equal to direction from vector1 to vector2. In other words this command produces normalised vector between given 2 points.
- vectorLinearConversionInterpolates vector between the given *vectorFrom* and *vectorTo* value according to the given range value.
- vectorMagnitudeMagnitude of a 3D vector.
- vectorMagnitudeSqrSquared magnitude of a 3D vector.
- vectorModelToWorldConverts vector direction from model to world space.
- vectorModelToWorldVisualConverts vector from model to world space in render time scope.
- vectorMultiplyMultiplies an array of numbers by a scalar or another array of numbers.
- vectorNormalizedReturns normalised vector (unit vector, vectorMagnitude == 1) of given vector. If given vector is 0 result is a 0 vector as well.
- vectorSideReturns an object's side vector in world space.
- vectorSideVisualReturns an object's side vector in world space and render time scope.
- vectorUpReturns an object's up vector in world space.
- vectorUpVisualReturns an object's up vector in world space and render time scope.
- vectorWorldToModelConverts vector direction from world to model space.
- vectorWorldToModelVisualConverts vector direction from world to model space in render time scope.