Topic: Pathfinding

Hey,
I want my AI to navigate around generated buildings and other colliders that acts as obstacles. Right now I'm using a simple raycast avoidance method, but it is not very consistent.

Are there any examples on how to implement pathfinding in online maps? I believe A* pathfinding was mentioned before, is it this one? https://assetstore.unity.com/packages/t … -pro-87744

It's a bit expensive so I want to know if I can make it work before buying it.

Thanks.

Re: Pathfinding

Hi.

Unfortunately, there is no general solution or good practice I can recommend here.

Whether this asset will work - most likely yes.
Whether there will be pitfalls here - also most likely yes.
Whether you can do without buying this asset - also yes.
AStar is a very easy algorithm, many implementations of which you can find on the Internet, for example:
https://github.com/davecusatis/A-Star-Sharp

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

3 (edited by CELL9 2023-03-31 13:14:53)

Re: Pathfinding

I see. It sounded like you had used it with this before. I assume it needs to be modified a bit considering how online maps works with coordinates. And it needs to be able to work with dynamic objects since buildings are not stationary in unity world space.

Re: Pathfinding

Have you found a solution to the pathfinding problem you mentioned? I am facing the same issue myself. I bought A* Pathfinding Pro, but the solutions it came with did not work for me. The closest I got to success was when I manually generated nodes based on "ways" data. However, I encountered a problem with map movement - the graph remained stationary whenever I moved the map or zoomed in. Updating the graph in real-time was too expensive in terms of performance. I am wondering if anyone has successfully integrated both assets and can offer some advice.