Skip to content
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

Call reload_space_override_modificator() directly when processing a body entering or leaving an area. #40186

Closed
wants to merge 1 commit into from

Conversation

madmiraal
Copy link
Contributor

Currently, when processing a RigidBody entering or exiting an Area, the code to update the effect that an Area has on a RigidBody 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 an Area is called as the RigidBody enters or exits the Area 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 a RigidBody 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 the RigidBody colliding with the Area, but that is for another PR.

entering or leaving an area instead of adding it to the queue to be called
during the next physics iteration.
@AndreaCatania
Copy link
Contributor

The issue is due to a flush callback order. The areas should be flushed before the other collision bodies. I've few ideas to solve it without making the flush immediate. I'll do a PR or update this PR, soon.
Thanks for the PR.

@AndreaCatania
Copy link
Contributor

I've open this: #40252

@akien-mga
Copy link
Member

Is this still relevant or fully superseded by #40252?

@madmiraal
Copy link
Contributor Author

Superseded by #40252.

@madmiraal
Copy link
Contributor Author

Reopening because #40252 was reverted with #42639.

@madmiraal madmiraal reopened this Oct 8, 2020
@madmiraal madmiraal removed the archived label Oct 8, 2020
@akien-mga
Copy link
Member

Closing as bullet was removed from the master branch (the 3.x equivalent is still open at #40187).

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.

4 participants