[3.x] FTI - Fix 3D auto-resets#105463
Merged
lawnjelly merged 1 commit intogodotengine:3.xfrom Apr 20, 2025
Merged
Conversation
* Ensure NOTIFICATION_RESET_PHYSICS_INTERPOLATION is sent to derived classes * Add deferred auto-resets for all `Spatials` on entering the tree
rburing
approved these changes
Apr 20, 2025
Member
rburing
left a comment
There was a problem hiding this comment.
Looks good, handles more cases. LGTM.
Member
Author
|
Thanks! |
This was referenced Apr 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTIFICATION_RESET_PHYSICS_INTERPOLATIONis sent to derived classesSpatialson entering the treeNotes
SceneTree#104269 that some of the auto-resets weren't working correctly (for the bullets)KinematicBody/CharacterBody3Dwhich isn't derived fromVisualInstanceSceneTreeFTIso took the opportunity to rewrite them to work more sensibly with the new system.Spatialsentering the scene tree add themselves to a list in theSceneTreeFTI, and all items on that list are reset prior to the tick and frame update. This ensures that allSpatials(not justVisualInstances) are reset, and only reset once on their first tick / frame on entering the tree.Spatialsthat havereset_physics_interpolation()called on them manually during the first tick / frame. This allows users to prime instances for moving starts, when desired.