Skip to content

Commit

Permalink
Fix NavigationServer3D.get_closest_point_to_segment() with use_collision
Browse files Browse the repository at this point in the history
  • Loading branch information
permelin committed Jun 20, 2024
1 parent 7aa30e3 commit fb3033c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/navigation/nav_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ Vector3 NavMap::get_closest_point_to_segment(const Vector3 &p_from, const Vector
const Face3 f(p.points[0].pos, p.points[point_id - 1].pos, p.points[point_id].pos);
Vector3 inters;
if (f.intersects_segment(p_from, p_to, &inters)) {
const real_t d = closest_point_d = p_from.distance_to(inters);
const real_t d = p_from.distance_to(inters);
if (use_collision == false) {
closest_point = inters;
use_collision = true;
Expand Down

0 comments on commit fb3033c

Please sign in to comment.