Function PathUtilities.GetPointsOnNodes
Returns randomly selected points on the specified nodes with each point being separated by clearanceRadius from each other.
List<Vector3> GetPointsOnNodes (
List<GraphNode> | nodes | |
int | count | |
float | clearanceRadius=0 |
Returns randomly selected points on the specified nodes with each point being separated by clearanceRadius from each other.
Selecting points ON the nodes only works for TriangleMeshNode (used by Recast Graph and Navmesh Graph) and GridNode (used by GridGraph). For other node types, only the positions of the nodes will be used.
clearanceRadius will be reduced if no valid points can be found.
This method assumes that the nodes in the list have the same type for some special cases. More specifically if the first node is not a TriangleMeshNode or a GridNode, it will use a fast path which assumes that all nodes in the list have the same surface area (which usually is a surface area of zero and the nodes are all PointNodes).