Method ClosestPointOnLineSegment
ClosestPointOnLineSegment(Vector3, Vector3, Vector3)
Returns the point along a line segment closest to a given point.
Declaration
public static Vector3 ClosestPointOnLineSegment(Vector3 point, Vector3 a, Vector3 b)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | point | The point to test against the line segment. |
| Vector3 | a | The first point of the line segment. |
| Vector3 | b | The second point of the line segment. |
Returns
| Type | Description |
|---|---|
| Vector3 | The point along the line segment closest to |