Function PathUtilities.GetPointsAroundPointWorld
Will calculate a number of points around p which are on the graph and are separated by clearance from each other.
void GetPointsAroundPointWorld (
p | The point to generate points around |
|
g | The graph to use for linecasting. If you are only using one graph, you can get this by AstarPath.active.graphs[0] as IRaycastableGraph. Note that not all graphs are raycastable, recast, navmesh and grid graphs are raycastable. On recast and navmesh it works the best. |
|
List<Vector3> | previousPoints | The points to use for reference. Note that these are in world space. The new points will overwrite the existing points in the list. The result will be in world space. |
float | radius | The final points will be at most this distance from p. |
float | clearanceRadius | The points will if possible be at least this distance from each other. |
Will calculate a number of points around p which are on the graph and are separated by clearance from each other.
This is like GetPointsAroundPoint except that previousPoints are treated as being in world space. The average of the points will be found and then that will be treated as the group center.