- A* version: 5.3.8
- Unity version: 6000.0.30f1
Hi,
Replace NavMesh by A* Pathfinding Project in pro version.
I am using a Grid configure like that (I tried multiple parameters, especially for ‘Diameter’ but I finally use 0.25 because it’s my agent size for this test) :
And my agents are configure like that :
The thing is my agents are sometime taking realy weird path, not the shortest they could.
Here is an example :
The scene during debug
Here I draw the situation, the blue outlined agent have destination green cross, and he take the red arrow as path instead of just passing by the left of the agent just below him.
Note that if I clic far Did I miss something ?
Here is the basic code I use to perform movement :
private void StartMovementToTarget(Vector3 target)
{
aiPath.destination = target;
aiPath.isStopped = false;
aiPath.SearchPath();
}
After a some debugging & testing I find out that disabling “Stop when destination is crowded” helped a lot to fix this particular problem, but I don’t understand why because the destination is not crowded (there is no agent at the destination).
Sorry for newbie question, I had setup all of these by following documentations & now I am experiencing, the main idea is to create a system of pathfinding like warcraft 3
If I miss a documentation on this, thanks for sharing it to me.
Thanks a lot for your advise