godotengine / godotengine/godot
Graphics shake violently if physics interpolation is enabled at runtime
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in dev 216b3302
### System information
Godot v4.4.dev (7d645fbea) - Windows 11 (build 22631) - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.15.6636) - AMD Ryzen 7 5800X3D 8-Core Processor (16 threads)
### Issue description
If physics interpolation is initially disabled, and then enabled at runtime, some graphics will start shaking violently as if they're constantly interpolating between two positions but the old and new positions don't get updated.
https://github.com/user-attachments/assets/9a9ecdb4-0bf2-4bf6-bb1c-e760586e7aa0
### Steps to reproduce
- Have `physics/common/physics_interpolation` disabled in Project Settings
- Call `get_tree().set_physics_interpolation_enabled(true);` at some point during runtime
Workaround is to call `get_tree().root.reset_physics_interpolation();` *after* the call to `set_physics_interpolation_enabled()`
Update: This workaround will not work for invisible objects. In fact there is currently no way to automatically reset interpolation on all invisible nodes without additional manual work for every affected object.
### Minimal reproduction project (MRP)
[PhysicsLerpIssue.zip](https://github.com/user-attachments/files/18323729/PhysicsLerpIssue.zip)
Contributor guide
Research direction
Start with the minimal reproduction project and reproduce the issue by enabling physics interpolation through SceneTree.set_physics_interpolation_enabled(true). Compare its behavior with root.reset_physics_interpolation(), including the reported invisible-object case. Done means runtime enabling updates interpolation state consistently without graphics shaking, including for invisible nodes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, godot
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100