I see. Find the/ some closest nodes (A,B) to the target which are connected via an edge. Then calculate the projection of node A to pos on the vector A->B. This is now your target position.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends