Skip to content

Physics Interpolation - Add editor configuration warnings#103504

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
lawnjelly:fti_warn_physics_non_interp4
May 26, 2025
Merged

Physics Interpolation - Add editor configuration warnings#103504
Repiteo merged 1 commit into
godotengine:masterfrom
lawnjelly:fti_warn_physics_non_interp4

Conversation

@lawnjelly
Copy link
Copy Markdown
Member

@lawnjelly lawnjelly commented Mar 3, 2025

  • For physics bodies that are on non-interpolated branches

4.x version of #103355
Helps address #103232 (comment)

non_interp_warning_4

Notes

  • I had not encountered this before, but it may not be obvious to users that physics bodies won't work correctly on non-interpolated branches of the scene tree.
  • This is simple to add and warns of the problem, and how to fix it.
  • The warning will show even in projects not using physics interpolation, but in most cases users will not have been changing physics_interpolation_mode except by accident. There's not a super easy way to check the global interpolation switch in the editor (except via the project setting) as it is hard coded OFF in the editor.
  • It is also possible to add some warnings at runtime for this (perhaps if the user switches interpolation mode of a branch at runtime) but seems less likely and can be added in a follow up PR.
  • Feel free to suggest changes to the wording / text formatting.

Comment thread scene/3d/physics/physics_body_3d.cpp Outdated
@lawnjelly lawnjelly force-pushed the fti_warn_physics_non_interp4 branch 2 times, most recently from 02b0c99 to 116606f Compare March 4, 2025 09:44
* For physics bodies that are on non-interpolated branches
@lawnjelly lawnjelly force-pushed the fti_warn_physics_non_interp4 branch from 116606f to 40c05c6 Compare April 20, 2025 09:05
@lawnjelly
Copy link
Copy Markdown
Member Author

Repushed this to remove the warnings on interpolated Spatials that were children of non-interpolated nodes, as this may now be possible with the new SceneTreeFTI, or at least I would like to establish that it can't be done before introducing a warning.

@Ivorforce Ivorforce modified the milestones: 4.x, 4.5 May 9, 2025
Copy link
Copy Markdown
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

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

Code wise this looks good.
As a usability feature, this sounds important. Let's get a review from editor folks too :)

@Ivorforce
Copy link
Copy Markdown
Member

Since we don't seem to be getting an editor review right now - following along with #103355 (comment), it should be fine to merge without one.

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.

Tested locally, it works as expected. Code looks good to me.

Note that the warning displays even if physics interpolation is disabled in the Project Settings, but I think it's fair as it ensures projects are interpolation-ready should they enable it later on.

@Repiteo Repiteo merged commit f3f76df into godotengine:master May 26, 2025
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented May 26, 2025

Thanks!

@lawnjelly lawnjelly deleted the fti_warn_physics_non_interp4 branch May 26, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants