M_Mesh:ClosestPoint(pos, ignoreID, maxPointID, endpointsOnly)

Version added: before 9.5

Arguments:

Name Type Description Default Ver
pos Vector2 A 2D location in the layer < 9.5
ignoreID int32 Point identifier - ignore this point when testing for the closest point -1 < 9.5
maxPointID int32 Point identifier - ignore points with identifiers higher than this id -1 < 9.5
endpointsOnly bool Added in version 12 false 12.0

Return value:

int32 point identifier
Returns the closest point to the given location.

Search results

Usage of 'ClosestPoint' is found in the following scripts:

<< Back to M_Mesh