mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Physics Interpolation - refactor client interpolation pump
* Move client interpolation pump to earlier in the iteration before 3D physics synced * Allow `get_global_transform_interpolated()` to prime the client interpolation inside a physics tick
This commit is contained in:
@@ -2367,14 +2367,14 @@ bool Main::iteration() {
|
||||
|
||||
uint64_t physics_begin = OS::get_singleton()->get_ticks_usec();
|
||||
|
||||
PhysicsServer::get_singleton()->flush_queries();
|
||||
|
||||
// Prepare the fixed timestep interpolated nodes
|
||||
// BEFORE they are updated by the physics 2D,
|
||||
// BEFORE they are updated by the physics,
|
||||
// otherwise the current and previous transforms
|
||||
// may be the same, and no interpolation takes place.
|
||||
OS::get_singleton()->get_main_loop()->iteration_prepare();
|
||||
|
||||
PhysicsServer::get_singleton()->flush_queries();
|
||||
|
||||
Physics2DServer::get_singleton()->sync();
|
||||
Physics2DServer::get_singleton()->flush_queries();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user