This function rotates the start position, around the axis formed by the two axis positions, by the given angle in degrees and returns the result as a pipe-bar delimited list.
VectorRotateAroundAxis([Start Position], [Axis Position 1], [Axis Position 2], [Angle])
Where:
Start Position is a pipe-bar delimited list representing the start position vector (X|Y|Z).
Axis Position 1 is a pipe-bar delimited list representing the first axis position vector (X|Y|Z).
Axis Position 2 is a pipe-bar delimited list representing the second axis position vector (X|Y|Z).
Angle is the angle in degrees the start position will be rotated around the axis by.
Rule | Result |
---|---|
VectorRotateAroundAxis("1|2|3","3|2|1","4|3|2",45) | Will return the vector 2.4|0.37|3.23 (values have been rounded for clarity). |
Due to floating point precision, some calculations may not be as precise as expected.
This can be avoided by following the advice in the topic Info: Floating Point Precision.