diff options
Diffstat (limited to 'scene/2d/navigation_obstacle_2d.cpp')
-rw-r--r-- | scene/2d/navigation_obstacle_2d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index c99b9777cd..0a105826c0 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -53,7 +53,7 @@ void NavigationObstacle2D::_notification(int p_what) { } break; case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { if (parent_node2d) { - NavigationServer2D::get_singleton()->agent_set_position(agent, parent_node2d->get_global_transform().get_origin()); + NavigationServer2D::get_singleton()->agent_set_position(agent, parent_node2d->get_global_position()); } } break; } @@ -92,13 +92,13 @@ void NavigationObstacle2D::update_agent_shape() { // and add the enclosing shape radius r += cs->get_shape()->get_enclosing_radius(); } - Size2 s = cs->get_global_transform().get_scale(); + Size2 s = cs->get_global_scale(); r *= MAX(s.x, s.y); // Takes the biggest radius radius = MAX(radius, r); } } - Vector2 s = parent_node2d->get_global_transform().get_scale(); + Vector2 s = parent_node2d->get_global_scale(); radius *= MAX(s.x, s.y); if (radius == 0.0) { |