Call reload_space_override_modificator() directly when processing a body entering or leaving an area. #40186
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.
Currently, when processing a
RigidBody
entering or exiting anArea
, the code to update the effect that anArea
has on aRigidBody
is not called directly, instead it is added to the queue to be processed in the next physics iteration.This PR ensures the code to update the effect an Area has on the
RigidBody
entering or exiting anArea
is called as theRigidBody
enters or exits theArea
ensuring its affect is felt immediately and not only in the next physics iteration.Improves #40127 which is caused by the effect an
Area
has on aRigidBody
only being applied two physics frames later. This PR reduces it to one. The other is due to a physics iteration still being required to detect theRigidBody
colliding with theArea
, but that is for another PR.