Skip to content

Remove outdated info about differences in 2D and 3D physics interpolation#11866

Merged
mhilbrunner merged 1 commit intogodotengine:masterfrom
ChudeRonczki:patch-1
Mar 29, 2026
Merged

Remove outdated info about differences in 2D and 3D physics interpolation#11866
mhilbrunner merged 1 commit intogodotengine:masterfrom
ChudeRonczki:patch-1

Conversation

@ChudeRonczki
Copy link
Copy Markdown
Contributor

The info on the page seems to describe how the engine worked before the SceneTreeFTI was introduced in Godot 4.5.

The "Global versus local interpolation" gives information that looks like the exact opposite of the current logic, where the SceneTreeFTI walks the whole hierarchy of both interpolated nodes and non-interpolated ones, but parented to interpolated, and sums the local transforms accordingly. Just like how the 2D inner workings are described.

The "Resetting physics interpolation" describes a difference that also looks to be no longer there. The code for NOTIFICATION_ENTER_TREE in Node3D::_notification seems to handle the reset automatically. The rest of the information in this section looks correct, but it just reiterates info from the "Using physics interpolation" article about resetting, and since there doesn't seem to be any difference anymore between 2D and 3D with this, it doesn't seem to fit this article anymore.

@ChudeRonczki ChudeRonczki requested review from a team as code owners March 21, 2026 18:15
@lawnjelly
Copy link
Copy Markdown
Member

Ah yes, good spot, the existing info on the differences is out of date. I'll check this is okay to remove.

We'll probably need to reintroduce the text about uninterpolated nodes only affecting local interpolation, and still inheriting interpolation from the parent, as this is now shared behaviour in 2D and 3D.

@ChudeRonczki
Copy link
Copy Markdown
Contributor Author

I can take a stab at rewriting this section into the "Advanced physics interpolation" article, because it's now probably a better fit for it. Is it fine for me to do this under this pull request?

@Calinou Calinou added bug area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:physics labels Mar 24, 2026
@Calinou
Copy link
Copy Markdown
Member

Calinou commented Mar 24, 2026

I can take a stab at rewriting this section into the "Advanced physics interpolation" article, because it's now probably a better fit for it. Is it fine for me to do this under this pull request?

Yes, I think it makes sense to do this in the same PR.

@lawnjelly
Copy link
Copy Markdown
Member

Something to note that I just realised:

The old method of scene traversal is still available via physics/3d/physics_interpolation/scene_traversal, so technically that text still makes sense in Legacy mode.

However, legacy mode was included really for the changeover to prevent any rewrites needed for people who had written under the old system, long term it could probably be removed a few point releases down the line.

So I'm not convinced we need a specific section in the help to describe it, just a note on the scene_traversal project setting is enough. If technically possible we could include a link to the previous documentation section on the web, but it's not vital imo.

@ChudeRonczki
Copy link
Copy Markdown
Contributor Author

ChudeRonczki commented Mar 25, 2026

The old method of scene traversal is still available via physics/3d/physics_interpolation/scene_traversal, so technically that text still makes sense in Legacy mode.

I might be misunderstanding the code, but I think this is not the case. There is indeed the legacy code for calculating transforms the way this doc describes, in Node3D::get_global_transform_interpolated, but it's under #if 1 ... #else, so practically unreachable. And the setting you pointed out seems to just influence the fashion in which the SceneTreeFTI walks the tree, always going from the root instead of starting with relevant branches, but shouldn't influence the results.

@lawnjelly
Copy link
Copy Markdown
Member

I might be misunderstanding the code, but I think this is not the case.

Ah yes, you are likely correct, I can't even remember myself as the author (can't remember last week, let alone months / years back 😁 ).

@ChudeRonczki
Copy link
Copy Markdown
Contributor Author

Ok, I reworded the parts from previously deleted info that still might be useful and moved it to the beginning of "Advanced physics interpolation", because that part was already talking about setting the interpolation mode per node, so it seemed fitting.

@lawnjelly
Copy link
Copy Markdown
Member

Aside from removing the line mentioned above this looks fine to me in terms of content. 👍

Copy link
Copy Markdown
Member

@lawnjelly lawnjelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine for content from me. Needs commits squashing though.

Copy link
Copy Markdown
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@mhilbrunner mhilbrunner merged commit ae594f0 into godotengine:master Mar 29, 2026
1 check passed
@mhilbrunner
Copy link
Copy Markdown
Member

Merged. Thanks and congrats on your first merged contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:manual Issues and PRs related to the Manual/Tutorials section of the documentation bug topic:physics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants