closestPointToPoint

fun closestPointToPoint(point: Vector3, clampToLine: Boolean, target: Vector3): Vector3

Writes the closest point on the line for a given point into target.

Return

The closest point on the line.

Parameters

point

The point to compute the closest point on the line for.

clampToLine

Whether to clamp the result to the range [0,1] or not.

target

The target vector that is used to store the method's result.