DriveWorks Pro 18: VectorLookAt [send feedback...]

VectorLookAt

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

Syntax

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

Where:

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).

Examples

RuleResult
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.

Table of Contents