Documentation / Node reference / code nodes

code/QuaternionFromUnitVectors

Outputs the rotation that turns one direction onto another.

Quaternion

Outputs the shortest rotation that turns v1 onto v2, as a quaternion. Both must be of length 1.

Parameters

Name Type What it does
v1 Vector3 Direction to turn from, of length 1.
v2 Vector3 Direction to turn to, of length 1.

This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.