getPickRay

fun getPickRay(windowPosition: Cartesian2, result: Ray? = definedExternally): Ray?(source)

Create a ray from the camera position through the pixel at windowPosition in world coordinates.

Return

Returns the Cartesian3 position and direction of the ray, or undefined if the pick ray cannot be determined.

Parameters

windowPosition

The x and y coordinates of a pixel.

result

The object onto which to store the result.

See also