Pārlūkot izejas kodu

Merge pull request #102184 from lawnjelly/fti_fix_client_ticking

[3.x] Physics Interpolation - fix client interpolation pump
lawnjelly 7 mēneši atpakaļ
vecāks
revīzija
a4349590c5
1 mainītis faili ar 5 papildinājumiem un 5 dzēšanām
  1. 5 5
      scene/main/scene_tree.cpp

+ 5 - 5
scene/main/scene_tree.cpp

@@ -564,11 +564,6 @@ void SceneTree::iteration_prepare() {
 		// are flushed before pumping the interpolation prev and currents.
 		// are flushed before pumping the interpolation prev and currents.
 		flush_transform_notifications();
 		flush_transform_notifications();
 		VisualServer::get_singleton()->tick();
 		VisualServer::get_singleton()->tick();
-
-		// Any objects performing client physics interpolation
-		// should be given an opportunity to keep their previous transforms
-		// up to date before each new physics tick.
-		_client_physics_interpolation.physics_process();
 	}
 	}
 }
 }
 
 
@@ -577,6 +572,11 @@ void SceneTree::iteration_end() {
 	// to be flushed to the VisualServer before finishing a physics tick.
 	// to be flushed to the VisualServer before finishing a physics tick.
 	if (_physics_interpolation_enabled) {
 	if (_physics_interpolation_enabled) {
 		flush_transform_notifications();
 		flush_transform_notifications();
+
+		// Any objects performing client physics interpolation
+		// should be given an opportunity to keep their previous transforms
+		// up to date.
+		_client_physics_interpolation.physics_process();
 	}
 	}
 }
 }