Pathfinding for procedurally generated 3D terrain

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

Hi,

I’m generating 3d landscapes using simplex noise, the generation is delegated to several threads so I can generate big or even infinite worlds.

I want to add some enemies to my world, so I need to implement some kind of pathfinding.

From what I can tell, Godot’s navmesh system cannot be used in my case because my terrain is generated at runtime.

I have looked at this question: https://forum.godotengine.org/48732/bake-navmesh-during-runtime, but I have not been able to get anything functional.

I have also tried to implement A*, but I am struggling to write the logic to link the correct nodes together - my terrain is generated in chunks so I need to make sure all the chunks are linked together along the edges (I’ve been stuck here for some time)

Are there any other methods you think I could try? Or do you think it would be better to implement some kind of bug algorithm for my enemies and use something like raycasting to detect objects?

Thanks.