I have a problem: when I try to get the distance of an object to a spline, I do the following
Everything’s fine up to this point. The problem arises when the spline goes back and forth very close to the same point.
At that moment, if iwalk in a zigzag pattern, for example, the distance changes from the outward path to the return path. I need a system that gives me the distance to the spline sequentially, without any jumps. When I go, it should give me the closest distance along the outbound route, and when I return, it should give me the closest distance along the return route.

