oh ok, I completely misunderstood the question. But we can build on that to come to the correct solution.
Thanks for the illustration! I think I know what you want to do now and its possibly quite simple. I hope this suggestion works for you:
Using the node “Get Point Distance to Line” we only need the actor’s location, a starting point for the line, and the vector it points off to. This function will calculate the distance between our location and the closest point on that infinite line - which is exactly what you are describing.
Hope this was more helpful!