Hi Using your plugin in our project, love it very much!

Now I am trying to implement sort of a “player-input assistance”, where it’s likely that I have a better idea where the player is trying to go than the input I’m actually receiving from him.

In essence, I have a grid graph (can have elevation as well, 2 floors), I have a point where player is holding the mouse for navigation (“go here”). And I would like to find a point on graph which has the shortest path to players position. I’d be ok if it was directly the graph node; point in between nodes would be even better but not 100% necessary.

As I imagine the problem in terms of what should be hopefully possible, it likely consists of 2 parts unless there’s a better native way:

1.) retrieve all valid points in an area given by a position and radius

2.) find paths/“on-graph distances” to all given points (1:N), and pick the shortest one

Even better would be, if “2.)” would just exit as soon as it either reaches any of the nodes in given area (area meaning point+radius); or if the shortest path already exceeds a given limit.

Illustration of my problem/goal:

Grid graph nodes = green

Player = blue

Mouse input = grey x

Area of interest = circle/sphere (doesn’t matter much) of given radius around the input

Point I want to find = red (with the shortest path from player of all nodes in area of interest)

// is fine if it was identical to the green point nearby, in case it’s not possible otherwise

I only care about the 1 retrieved point, so it would be perfect if the whole evaluation could exit as early as possible, and I could set a limit (max path length) for early exit, after which I’d handle the situation differently (just take the mouse input as target position, excluding the ‘assist’).

Anyway, would love to know what’s the best way to address this with your A* Pathfinding lib? Thank you!