How to spawn a unit without overlapping existing units

Hello,

Is there a built-in API for this? I need an API similar to:
Vector2 CalcSpawnPosition(List circles, float newUnitRadius)
If not, do you have any references or solutions for it?

Within Astar? No not particularly- Astar only really will handle pathfinding/movement but not spawning or any other logic like that. You’d likely need to write this manually.

There are actually some APIs for this:

See

These are intended for formation movements, so they are not quite what you are looking for. But perhaps they can be useful anyway.

1 Like