How can I find the shortest amount of jumps between two points on a map?

There’s no super-simple solution to this problem. You need a pathfinding algorithm.

The most straightforward solution is probably the A* algorithm :

You can either implement it yourself, or use the general-purpose implementation provided by the Engine (in GraphAStar.h). The builtin solution is very generic and requires some setup to adapt to your own classes. See below how it can be used :

2 Likes