mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-07 20:41:50 +02:00
Physics Interpolation - fix client interpolation pump
Client interpolation pump is moved AFTER the physics tick, after physics objects have been moved. This is necessary because the `current` transform is also updated during the pump.
This commit is contained in:
parent
f44455c377
commit
0269f45fe5
@ -618,11 +618,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();
|
||||||
RenderingServer::get_singleton()->tick();
|
RenderingServer::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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,6 +626,11 @@ void SceneTree::iteration_end() {
|
|||||||
// to be flushed to the RenderingServer before finishing a physics tick.
|
// to be flushed to the RenderingServer 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user