[fixed] intersect.line_circle_overlap bug

This commit is contained in:
Max Cahill 2021-05-13 16:13:30 +10:00
parent 6fae516630
commit 2d06ec7b9c

View File

@ -110,7 +110,7 @@ end
--overlap a line segment with a circle
function intersect.line_circle_overlap(a_start, a_end, a_rad, b_pos, b_rad)
local nearest = intersect._line_to_point(a_start, a_end, b_pos, vec2:pooled())
local nearest = intersect.nearest_point_on_line(a_start, a_end, b_pos, vec2:pooled())
local overlapped = intersect.circle_point_overlap(b_pos, a_rad + b_rad, nearest)
nearest:release()
return overlapped