I asked Gemini about the code for the pathfinder. Among other things, it said there’s a fail safe like feature that prevents too many resources from being used. Meaning locked up or I guess crashing. It only allows so many iratations before assuming a path can’t be found.
My tests didn’t use obstacles. I guess that’s not part of the method. Yes, there no need to use the pathfinder without obstacles. I was just checking for size limitations.
I wonder if my results would be different with obstacles.
How far are you trying to move your object(s)?
I guess you could breakup the path although I’m not sure what the best method would be. I guess it would depend on the scene.
If there weren’t too many obstacles then breaking up the path using a straight path split up into sections should work.
I’m just concerned that if the path was way off the direct path then it wouldn’t work. In that case, I guess waypoints would work. Even that doesn’t seem to create the shortest path. It would depend on the path.
Gemini’s response.
In the GDevelop source code (specifically in the PathSearchContext), there is a hard-coded or property-defined limit on the number of nodes it can explore.
Iteration Limit: To prevent a infinite loop or a “Total Freeze” of your browser/phone, the search stops after a certain number of iterations (often 2,000 to 5,000 nodes).
Grid Math: If your cell size is 20px, a 10,000px distance is 500 cells away. A search that expands 500 cells in every direction covers a massive area.
The Result: The algorithm hits its “Search Budget,” decides the destination is unreachable within that budget, and returns false. This is why your object simply won’t move.