A* Pathfinding Project

Upgrading from basic, old AILerp


#1

Hey, I have a pretty large question. I’d very much appreciate any help.

I started my project years ago, and I’m looking to upgrade my AILerp-based solution, and upgrade from an old 3.8.12 (free) version of AStar. The project is 2D on XY coordinates. My unity version is 2018.2.8f1.

Basically, the issue I am finding is that AI agents tend to clump together when approaching across larger distances. Also, randomized pathing could solve most issues. I am looking for movement that does not follow the nodes closely.

So, I am wondering whether I could add somehow local avoidance into my AILerp-solution. Or random pathing. Anything to solve the issue where AI agents tend to take the same route towards a point, and they arrive clumped together. They seem to prefer moving on Y axis first, so all the agents tend arrive on the same Y coordinate if they started even semi-close together and start walking towards the right X coordinate direction. I’ve even heard of AlternatePath, but I’m not sure how to use it and if it works with AILerp and if it’s what I’m looking for.

Also, I am wondering which version I could upgrade to, in the limits of my unity version. Can I even upgrade to 4.x?

Thank you for your help.

Update: I am having some success with AlternativePath. It may be all I need. There’s still some clumping issues, but they’re a little better. They still seem to prefer moving to correct Y axis, then X, though, which is not ideal. Any suggestions for this?


#2

Hi

If you want more physics-like movement you probably want to use the AIPath script instead of AILerp.
See this page for a comparison of the movement scripts https://arongranberg.com/astar/docs/movementscripts.html

Regarding the version. Even the latest version (4.2.8) supports Unity versions as old as 5.2.2.

You could try changing the heuristic. Make sure it is set to ‘Euclidean’, I think that will work best for this use case.