get_global_transform_interpolated()
may return wrong value when FPS < physics ticks per second
#102142
Labels
Milestone
Tested versions
System information
Godot v4.4.beta (a013481) - CachyOS Linux #1 SMP PREEMPT_DYNAMIC Mon, 20 Jan 2025 21:26:55 +0000 on Wayland - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - integrated Intel(R) HD Graphics 620 (KBL GT2) - Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 threads)
Issue description
When FPS drops below
physics_ticks_per_second
the functionget_global_transform_interpolated()
sometimes returns wrong value.When calling
get_global_transform_interpolated()
in a_process()
I expect to get the most recent interpolated transform regardless of how many physics ticks happen between successive process frames. I think the actual returned value may be interpolated transform only after 1 physics tick that occurred directly after the previous process frame.The issue is about functionality introduced to
4.4.dev1
in #92391 but it is also reproducible in3.6
version of physics interpolation.Steps to reproduce
Run the MRP and notice NinePatchRect is constantly jittering.
In order to reproduce the issue the project has
max_fps
set lower thanphysics_ticks_per_second
.If needed I can provide even more simplified MRP without the usage of
Camera3D.unproject_position()
.Minimal reproduction project (MRP)
Godot 4.x project:
test-physics-interpolation-maxfps.zip
Godot 3.x project:
Test Physics Interpolation max_fps Godot3.zip
The text was updated successfully, but these errors were encountered: