Skip to content

estimateRotationYZ

estimateRotationYZ(axisY, axisZ): Quaternion

Approximate rotation quaternion from basis vectors

Y vector defined the main Y axis that says fixed. Provided Z vector is preferred direction of Z axis. X axis is evaluated to be perpendicular to both Y and Z and form right-handed basis. Finally, Z axis is re-normalized to form orthonormal basis.

Vector3

The main Y axis

Vector3

Preferred direction of Z axis

Quaternion

Rotation quaternion