diff --git a/main/main.cpp b/main/main.cpp index c6e653d895c..eff03addb10 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -4646,13 +4646,6 @@ bool Main::iteration() { XRServer::get_singleton()->_process(); #endif // XR_DISABLED -#ifndef NAVIGATION_2D_DISABLED - NavigationServer2D::get_singleton()->sync(); -#endif // NAVIGATION_2D_DISABLED -#ifndef NAVIGATION_3D_DISABLED - NavigationServer3D::get_singleton()->sync(); -#endif // NAVIGATION_3D_DISABLED - for (int iters = 0; iters < advance.physics_steps; ++iters) { if (Input::get_singleton()->is_agile_input_event_flushing()) { Input::get_singleton()->flush_buffered_events(); diff --git a/modules/navigation_2d/2d/godot_navigation_server_2d.cpp b/modules/navigation_2d/2d/godot_navigation_server_2d.cpp index a3caf0a889b..b4299435958 100644 --- a/modules/navigation_2d/2d/godot_navigation_server_2d.cpp +++ b/modules/navigation_2d/2d/godot_navigation_server_2d.cpp @@ -1262,6 +1262,8 @@ void GodotNavigationServer2D::process(double p_delta_time) { // Will run reliably every rendered frame independent of the physics tick rate. // Use for things that (only) need to update once per main loop iteration and rendered frame or is visible to the user. // E.g. (final) sync of objects for this main loop iteration, updating rendered debug visuals, updating debug statistics, ... + + sync(); } void GodotNavigationServer2D::physics_process(double p_delta_time) { diff --git a/modules/navigation_3d/3d/godot_navigation_server_3d.cpp b/modules/navigation_3d/3d/godot_navigation_server_3d.cpp index 4fd569e7267..a2061f871aa 100644 --- a/modules/navigation_3d/3d/godot_navigation_server_3d.cpp +++ b/modules/navigation_3d/3d/godot_navigation_server_3d.cpp @@ -1343,6 +1343,8 @@ void GodotNavigationServer3D::process(double p_delta_time) { // Will run reliably every rendered frame independent of the physics tick rate. // Use for things that (only) need to update once per main loop iteration and rendered frame or is visible to the user. // E.g. (final) sync of objects for this main loop iteration, updating rendered debug visuals, updating debug statistics, ... + + sync(); } void GodotNavigationServer3D::physics_process(double p_delta_time) {