- Home /
Irregular Spherical Pathfinding
I would like to give units the ability to navigate around an irregular 3D mesh. The best solution I've found has been https://skeledurr.tumblr.com/post/120149790225/bone-crush-spherical-grid-and-a-star-pathfinding which uses an icosahedron mesh to distribute the points of an A* grid. I was wondering if there were any similar solutions which can use a more deformed mesh.
Answer by Konomira · Dec 09, 2020 at 12:18 PM
You can basically just use A*, but you'd need to modify your distance heuristic to follow an arc around the circumference of the sphere. It entirely depends on how accurate you want the path finding to be as you can approximate the point as if it was a smooth sphere and just have the players follow it clamped to the surface of the sphere.
I'd have a look at this site to calculate the arc length based on the chord (straight-line distance) and the radius of the sphere