-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Physics running on separate thread with max fps enabled causes the physics server to be synchronized every frame when a collision happens #94205
Comments
I suspect this is a valid error unfortunately. Due to a bug, these sync errors weren't being reported until #93367 (merged in Beta 3). The error checks if a function is causing excessive synchronizations between the physics thread and the main thread. I can see that it is possible for When you set If I am correct, this new error message has identified an area where Godot's physics system is not functioning correctly. Normal use of I suspect that the original regression is from #52889 and we just never caught it since we didn't have proper debugging tools I suggest that for 4.3, we just disable this error tracking and then re-enable it in 4.4 with a goal of finding and fixing all the issues it catches |
Maybe it should be specified in the documentation for those two options that they shouldn't be used together until the issue is resolved? |
I think it is fine to use them together for now as it is no worse than it has been for the last 3 years. The combination of those two things is just triggering the error. The underlying problem is there whenever someone uses |
Yesterday i've ported my project from 4.3 beta2 to 4.3 beta3 and i've ran into the same issue. |
The issue is here (as also analyzed by @clayjohn above) in godot/scene/3d/physics/character_body_3d.cpp Line 609 in 97b8ad1
This is used for the character body "platform floor and wall layers" feature: godot/scene/3d/physics/character_body_3d.cpp Lines 51 to 58 in 97b8ad1
One way around the problem would be to add As an alternative I thought godot/servers/physics_server_3d_wrap_mt.h Lines 263 to 267 in 97b8ad1
I don't know how else to solve it while keeping the "platform floor and wall layers" feature intact. I wonder how much this feature is used in the wild (i.e. with cc @fabriceci |
The regression / warning spam is mitigated for 4.3 with #94279. Keeping the issue open for the 4.4 milestone to address the underlying issue properly (which is not a regression). |
Tested versions
System information
Manjaro Linux - Godot v4.3.beta3 - Forward+
Issue description
When
physics/2d/run_on_separate_thread
orphysics/3d/run_on_separate_thread
is enabled andapplication/run/max_fps
is set to any value higher than zero in the project settings, moving a CharacterBody2D or a CharacterBody3D withmove_and_slide
will cause this warning to be printed in the console every time it collides with something:This does not happen if
physics/2d/run_on_separate_thread
is set to false andapplication/run/max_fps
is set to something higher than zero or ifapplication/run/max_fps
is set to zero andphysics/2d/run_on_separate_thread
is set to true.The warning is not printed in v4.3 beta 2.
Steps to reproduce
move_and_slide
. This also happens with the built-in template.Running the project now will cause the warning to be printed every time there is a collision.
Minimal reproduction project (MRP)
issure-reproduction-project.zip
The text was updated successfully, but these errors were encountered: