• Computes a 4-by-4 aim transformation.

    This is a matrix which positions an object aiming down positive Z. toward the target.

    Note: this is NOT the inverse of lookAt as lookAt looks at negative Z.

    Type Parameters

    Parameters

    • position: BaseArgType

      The position of the object.

    • target: BaseArgType

      The position meant to be aimed at.

    • up: BaseArgType

      A vector pointing up.

    • Optional dst: T

      matrix to hold result. If not passed a new one is created.

    Returns T

    The aim matrix.