You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Physics Interpolation - Flush transforms after physics tick
Leftover transforms from the physics tick were being flushed during idle, which was causing problems for physics interpolation. This PR flushes the transforms at the end of the physics tick when physics interpolation is active.
This commit is contained in:
@@ -525,6 +525,14 @@ void SceneTree::client_physics_interpolation_remove_spatial(SelfList<Spatial> *p
|
||||
_client_physics_interpolation._spatials_list.remove(p_elem);
|
||||
}
|
||||
|
||||
void SceneTree::iteration_end() {
|
||||
// When physics interpolation is active, we want all pending transforms
|
||||
// to be flushed to the VisualServer before finishing a physics tick.
|
||||
if (_physics_interpolation_enabled) {
|
||||
flush_transform_notifications();
|
||||
}
|
||||
}
|
||||
|
||||
bool SceneTree::iteration(float p_time) {
|
||||
root_lock++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user