A* Pathfinding Project

Pathfinding in 2D mode


Hi there. I’m looking into buying this asset but I have a question I would like to clear up first. TLDR: Does this script work with the xy plane in unity (where z would point upwards) for a top down 2d game?

I looked a bit into forum questions and answers here and it seems to me that it is possible, but not encouraged (due to some strange sideeffects and certain features not working properly on xy plane).

I worked a while ago with unity when the 2D features where fairly new and I had some troubles with the pathfinding stuff, exactly because the pathfinding did only work on xz plane but 2d view was on the xy plane.


I just get started a top-down 2D game with this asset, still in the learning stage. Indeed there’s many spaces to improve, but it works. There’s a section about 2D support in the document, you’re welcome to read it first. And the two 2d examples are both top-down, should be useful. And forum is your friend, a lot problems has been solved/tracked, just not updated to the code base/document in a user friendly way.


Yes, top down 2D is supported very well.

The thing that does not work in 2D is primarily the recast graph (well, you can rotate it to the 2D plane, but it does not use 2D colliders or sprites in the rasterization process, so it is not particularly useful in 2D).

The built-in movement scripts AIPath and AILerp work perfectly fine in 2D.