Hi, we used A* Pathfinding project for our game and now we are trying to understand the difference between 2D and 3D pathfinding for choosing the right one for our new game. I created 2 scenes with follower entity on enemies, grid graph, and rvo simulator for local avoidance. Only difference between these scenes is one scene is completely 2D( İn A*star orientation settings and colliders) and the other one is 3D with height testing enabled. But I couldn’t see any difference in profiler and I was expecting the 2D version would be much more lighter since it( I assume) works with vector2 instead of vector3.
Edit : 2D scene is duplicated from 3D and rotated 90 degrees, colliders of follower entity objects replaced from Capsule to circle. Their follower entity oritentations set to 2D. And in Astar component 2D and Use2D Collisions checked and height testing unchecked. Also RVO simulator movement plane set to XY. These are all the differences between these 2 scenes
Hi
Even in 2D mode, the calculations for local avoidance and pathfinding are essentially the same. Local avoidance is 2.5D even in “3D” mode.
Scanning a 2D recast graph is probably slightly faster than a 3D graph, but otherwise I would not expect any significant performance differences.
Is there anything that we can do for making it work with vector 2 ? I’m aware of the optimizations that we can make according to the documentation but I believe we can make use of 2D calculations since we don’t need any depth in our vampire survivors like game.
Not really. But in any case, I don’t think the calculations are limited significantly by the raw vector3 vs vector2 calculations. So I doubt it would make a significant difference even if you could. And it would be very hard to do this, as it would require basically duplicating a large part of the code-base.

