diff options
Diffstat (limited to 'scene/resources/line_shape_2d.cpp')
-rw-r--r-- | scene/resources/line_shape_2d.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/line_shape_2d.cpp b/scene/resources/line_shape_2d.cpp index 802ccaaee6..58653c5f4a 100644 --- a/scene/resources/line_shape_2d.cpp +++ b/scene/resources/line_shape_2d.cpp @@ -30,6 +30,7 @@ #include "line_shape_2d.h" +#include "core/math/geometry_2d.h" #include "servers/physics_server_2d.h" #include "servers/rendering_server.h" @@ -38,7 +39,7 @@ bool LineShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tol Vector2 l[2][2] = { { point - get_normal().tangent() * 100, point + get_normal().tangent() * 100 }, { point, point + get_normal() * 30 } }; for (int i = 0; i < 2; i++) { - Vector2 closest = Geometry::get_closest_point_to_segment_2d(p_point, l[i]); + Vector2 closest = Geometry2D::get_closest_point_to_segment(p_point, l[i]); if (p_point.distance_to(closest) < p_tolerance) { return true; } |