hitTest

fun hitTest(originWorldPosition: FloatArray, destWorldPosition: FloatArray): Boolean

Performs a hit test between the BoundingSphere and the ray defined by the origin & destination points.

This function calculates whether the ray intersects the BoundingSphere.

Return

true if the ray intersects the BoundingSphere, false otherwise.

Parameters

originWorldPosition

The world position of the origin point of the ray.

destWorldPosition

The world position of the destination point of the ray.

See also


fun hitTest(quaternion: Quaternion): Boolean

Performs a hit test with the given quaternion and the BoundingSphere.

This function calculates whether the centerWorldPosition, after being rotated by the given quaternion, is inside the radius.

Return

true if centerWorldPosition, after being rotated by the given quaternion, is inside the radius.

Parameters

quaternion

The quaternion rotation to apply to centerWorldPosition.

See also