I'm trying to create a sort of "crane" that moves from a starting checkpoint to a known ending point. However, it shouldn't follow a straight line there; it should be bound within what are best described as roads.
So the crane can only move along the roads, and needs to find a series of checkpoints between the starting point and the ending point. I need a good method of finding this series. Here's a picture of what I mean:
https://gyazo.com/3c76ff069715ceffe721cc3c6b7a2f9a
The black block on the right is the crane, and the gray transparent blocks on the "roads" are checkpoints. The red transparent blocks are known ending points. If I input the ending point I want the crane to travel to as the ending point on the left, what method can I use to find the a series of checkpoints between the start point and the ending point specified?

1 comment
yeah, i considered using A* because it seemed like the right solution but in my case, i think it'd be easier to predefine routes using tables of checkpoints for each endpoint from the starting position. thanks for the reply