Pathfinding in 3D (A*)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Oen44

I’m looking for a way to implement A* algorithm for 3D scene. It’s easy to implement that for 2D but I can’t think of a way to do that with 3D scene and all these objects that can block movement.
Anyone done that and can share some thoughts on how to achieve that?

:bust_in_silhouette: Reply From: SIsilicon

A* already has a built-in implementation. It is used in 2D and 3D by both the Navigation2D and navigation nodes respectively. Unless you want to make a custom implement, these should suffice. Infact, there is a demo that demonstrates the navigation node at work. Any(follow up) questions?

Thanks, didn’t know that. About points, are they like nodes that A* is checking while looking for best path? If I want to go from A to B and there are rocks on the way, how do I handle that?

Oen44 | 2018-09-16 21:48

Points? What are you referring to? The array of points that the navigation node returns?

SIsilicon | 2018-09-17 21:17

AStart add_point method.
Forget it, just checked example project from your answer (should have do that at the beginning) and it looks easier than I thought. Thanks.

Oen44 | 2018-09-17 21:19