Home Search

DriveWorks Pro 22

Send Feedback


This function creates the required Euler rotation for one position to face another, and returns the result as a pipe-bar delimited list.


VectorLookAt([Origin Position], [Target Position])


Origin Position is a pipe-bar delimited list representing the origin position vector (X|Y|Z).

Target Position is a pipe-bar delimited list representing the target position vector (X|Y|Z).


VectorLookAt("1|2|3","4|5|6")Will return the Euler rotation for the origin to face the target, 35.26|315|15 (values have been rounded for clarity).
Floating Point Precision

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.

Please see How To: Understanding Vector Functions for more information on Vectors, all the Vector functions provided in DriveWorks and use case examples.