Method FindClosestEdge
FindClosestEdge(List<Vector3>, Vector3, out Vector3, out Vector3)
Finds the side of a polygon closest to a specified world space position.
Declaration
public static bool FindClosestEdge(List<Vector3> vertices, Vector3 point, out Vector3 vertexA, out Vector3 vertexB)
Parameters
Type | Name | Description |
---|---|---|
List<Vector3> | vertices | Vertices defining the outline of a polygon. |
Vector3 | point | The position in space to find the two closest outline vertices to. |
Vector3 | vertexA | The coordinates of the first vertex of the nearest side is assigned to this |
Vector3 | vertexB | The coordinates of the second vertex of the nearest side is assigned to this |
Returns
Type | Description |
---|---|
bool | True if a nearest edge could be found. |