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

Cache contacts for sleeping bodies when using Jolt Physics #100701

Closed
wants to merge 1 commit into from

Conversation

mihe
Copy link
Contributor

@mihe mihe commented Dec 21, 2024

Reverts #100533.
Fixes #100515.
Fixes #100700.

This pull request does two things:

  1. It reverts the changes to jolt_contact_listener_3d.cpp introduced in #100533, due to taking a different approach to solving #100515.
  2. It solves #100515 by instead emulating what Godot Physics does, which is to only clear the list of contacts while a body is actually active/awake. This means we're now deliberately keeping (potentially stale) contacts around when a body goes to sleep, in order to better facilitate contact-based logic in scripts, as discussed in #100533.

@mihe
Copy link
Contributor Author

mihe commented Dec 31, 2024

I've put up another pull request (#100983) to change the way in which sleeping bodies are iterated over when using Jolt, which inadvertently resolves #100700. This means the changes to JoltBody3D in this pull request aren't needed anymore, so I'll put up a new pull request that just reverts #100533 instead.

@mihe mihe closed this Dec 31, 2024
@mihe mihe added the archived label Dec 31, 2024
@mihe mihe deleted the jolt/cache-sleeping-contacts branch December 31, 2024 17:56
@AThousandShips AThousandShips removed this from the 4.4 milestone Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants