lookAt method

Quaternion lookAt(
  1. Vector3 localForward,
  2. Vector3 targetDirection,
  3. Vector3 localUp
)

Creates a quaternion that orients an object to face towards a specified target direction.

Implementation

Quaternion lookAt(Vector3 localForward, Vector3 targetDirection, Vector3 localUp ) {
	matrix.lookAt( localForward, targetDirection, localUp );
	fromMatrix3( matrix );
    return this;
}