API

Function ComputeLookAtFromYawPitchToRef

  • Compute the lookAt direction vector from yaw and pitch angles at a given center point. This is the forward formula used by GeospatialCamera._setOrientation.

    Parameters

    • yaw: number

      The yaw angle in radians (0 = north, π/2 = east)

    • pitch: number

      The pitch angle in radians (0 = looking at planet center, π/2 = looking at horizon)

    • center: Vector3

      The center point on the globe

    • useRightHandedSystem: boolean

      Whether the scene uses a right-handed coordinate system

    • result: Vector3

      The vector to store the result in

    • OptionalcalculateUpVectorFromPointToRef: (point: Vector3, result: Vector3) => Vector3

      Optional function to calculate the up vector from a point, allowing for non-spherical planets. If not supplied, a perfect sphere is assumed and the up vector is just the normalized center point.

    Returns Vector3

    The normalized lookAt direction vector (same as result)