Documentation - v19.12.0-dev
    Preparing search index...

    Function getQuaternionFromVectors

    • Computes the quaternion that rotates defaultDirection onto the direction from startPosition to endPosition.

      Parameters

      • startPosition: Vector3

        The origin of the target direction.

      • endPosition: Vector3

        The point the target direction points towards.

      • defaultDirection: Vector3

        The direction the rotation starts from.

      • target: Quaternion

        The quaternion that will receive the result.

      Returns Quaternion

      The target quaternion, set to the computed rotation.