This is an automated archive made by the Lemmit Bot.

The original was posted on /r/godot by /u/ProbablyNotOnline on 2023-08-07 00:38:27.


I spent a good few months exploring other engines but recently returned to godot and put this together. Its based off autonomous driving research I’ve read, the idea being we want to pathfind without a grid and bound by physical limitations such as turning radii.

X marks the origin

I believe this would be (o)n complexity, so its not super scalable, if I were to implement it at runtime, I’d generate these when loading in the entity and then simply test to make sure the paths are valid.

The mechanics are simple enough, you have a set of movement primitives (the three logos by the x) which are a set of predetermined moves and their rotation (1, 0, 0) (1, -1, 45) (1, 1, -45). We then spawn a new set of primitives at the transform of the last set to get the next generation, we repeat this process as many steps as we want. We then know every location we can reach.

For more advanced implementations we can add collision checks, weighted costs (to make moving forward faster than turning), and so on. This is based of “lattice path planning” if you wish to read more.

Thought it was something fun to share, hope you enjoyed reading