A* Pathfinding Project

Large Game World



I recently download the free version of the project and really liking it. I’m considering purchasing a pro license. I have come across an issue which is similar to what others have posted but also slightly different. I have a large game world. I’m using just shy of the maximum Unity world size before getting into any float point issues.

I’m building an space RTS and have an interesting use case where there’s a lot of empty space between planets. There’s no terrain to speak of so i thought a grid graph would work best. Players and AI naturally build a lot of structures around planets but will also be able to build them in deep space as staging areas. I’m able to get a grid graph to stretch to the entire size of the world but the problem then the offset of that is that the nodes are really huge. From a navigation perspective it’s not an issue as my ships are moving to a Vector3 in space but in terms of object avoidance and dynamic obstacles on the grid I’m not sure how to proceed? For space stations that get built i can’t use dynamic grid obstacles because they wipe out a large portion of the navigational space.

Is there a way an object can avoid other objects that are either stationary or in motion using another method?



A follow up query to this would be whether or not multiple smaller grid graphs can be positioned side by side to allow smaller nodes. I could then maybe use tags on the nodes for avoidance?

I was reading that i might need to have an empty Gameobject acting as the bridge to each graph but i’m not really sure how to implement that at the moment.




I’d be very careful with a world that large. All kinds of weird issues can happen when you start to get into the floating point issue territory.

If you have vast amounts of space, then trying to cover it all with a grid graph with a reasonable resolution will be hard. Some kind of local avoidance usually works better when there are very few obstacles and they have simple shapes (e.g. convex).
There is an included local avoidance library in this package, however it is more suited for bipedal agents like humans, not really vehicles. You could check out UnitySteer or other similar local avoidance libraries that use raycasting to approximately avoid obstacles instead of planning.


Thanks Aron,

I appreciate your feedback and for the suggestion of using UnitySteer. I haven’t looked into it as of yet but just a quick question on it. Does it work with A* pathfinding or are you suggesting i use that instead of a mix of methods?



Hi Aron,

Thanks for your suggestion to try UnitySteer. I managed to get it working fairly well. I’m using it along side with A*. I like the settings in A* for quick acceleration and deceleration compared to UnitySteer. UnitySteer is great for steering the ships at a slow speed but A* is great for faster than light jumps.

Thanks again for your help.