Ah ah, I would like to return the orange node closest to the player follow the path search, not very clear?
It's complicated what I want to do, really not easy at all!
When I double-click on a node, the program must:
Search for the orange node closest to the player, but in the direction of the destination, in the example with the image, it's node: B8, get it?
Only it has to be the next orange node on the path towards the target, understand?
I've done this, but it only works on one condition: as indicated, this is what it does, but not what I want. If you're less than half the distance to the next orange node, then the node you return to will be the one before, not the next, so it's no good, imagine you're less than half the distance to node B8 (between B7 and B8, but before B8), so if I double-click on B8 or B1 or even B2 or D2, C3, D1, for example, it will return B7 when it should be B8 because it's the next node in the direction of X.
Test this and you'll see, depending on where you are, there may be errors.
try between B8 and B1 when the character moves from one to the other, and you'll see some problems.
drive.google.com/file/d/1zlWIeCnHETZ_M4H9ydx1EC7F3ya07XWf/view
Anyway, there are still things I want to do here but I'll post when I want.