Function Navigation.getClosestPointToSegment
Returns the navigation point closest to the given line segment. When enabling use_collision
, only considers intersection points between segment and navigation meshes. If multiple intersection points are found, the one closest to the segment start point is returned.