FMath::PointDistToLine does not
actually get a point along the line.
It seems to get a point on the
opposite side of the targetpoint from
the line.
(I can draw up an example image if needed)
I had assumed the function was suppose to get a point along the line to return the distance from, but there is no comments above the function so Im not entirely sure.
The documentation for FMath::PointDistToLine (FMath::PointDistToLine | Unreal Engine Documentation) says that the intended functionality is to “Calculate the distance of a given Point in world space to a given line.” This seems to imply that the return value is the distance between a stated point and a specified line rather than the Point being on the line. Let us know if this differs from what you’re seeing when using the function.