-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 interpolation - Move out of Scenario #60147
Physics interpolation - Move out of Scenario #60147
Conversation
Move VisualServer interpolation data out of Scenario and into VisualServerScene, so the interpolation data and enabled status is now common to all Scenarios. Fix physics interpolation in multithreaded mode by ensuring tick and pre-draw are called.
Feedback from reduz:
Given that the latter two could introduce new bugs, and this PR currently fixes the outstanding multitthreading bug with (hopefully) no other side effects, we should probably also consider merging this in the meantime so we have a solid build in the current 3.5. The latter two may take a bit of time to come up with good improvements (as they are essentially housekeeping changes), and probably deserve to be considered in separate PRs where they can be examined in more detail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go with this for 3.5 beta 4 as discussed.
Thanks! |
@lawnjelly Cool stuff. Does this men that now it be used from 2D as well? Unfortunately it looks like all the major sexy features of the recent 3.x betas like this one and ubershader don’t apply to a 2D/gles2 setup for me to try out on an advanced project. |
Not yet – physics interpolation still needs to be ported to the 2D physics engine. |
Move VisualServer interpolation data out of Scenario and into VisualServerScene, so the interpolation data and enabled status is now common to all Scenarios.
Fix physics interpolation in multithreaded mode by ensuring tick and pre-draw are called.
Fixes #59736
Alternative to #59875
Notes
Scenario
and have it global, so there is a global on or off. He suggested there should usually only be oneSceneTree
, and this should fit 99% use cases.SceneTree
for his game (further description is in Physics interpolation - Fix multithreaded rendering #59875 (comment) )SceneTree
s to create a RID in the VisualServer and hang the interpolation data of this, thus making it selectable per SceneTree (there is currently no concept of aSceneTree
in the VisualServer afaik)VisualServerScene
thus is only global in the sense ofVisualServer
being a singleton, and thus if @jordo is creating several VisualServers, he may be able to independently turn interpolation on and offusing the
VisualServer::set_physics_interpolation_enabled(bool)
function. I don't know enough about his version to know if this would work for his purpose.