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

Inset boundary particles during dynamic collider sampling #66

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SludgePhD
Copy link
Contributor

When switching the dynamic bodies in the simple2.rs example to use dynamic collider sampling, the result looks like there is an invisible force field surrounding the objects:

screenshot_25-01-15_09:50:00

This is happening because boundary particles are placed precisely on the collider surface, so they protrude by the particle radius, making the body behave as if it was bigger.

This PR insets these boundary particles by their radius along the computed normal, which fixes that problem and makes the colliders roughly match the static sampling that is used for them by default.

It does come with a drawback though: particles now have an easier time slipping out of concave shapes with zero thickness, such as the heightfield used by the examples, so now there's some fluid leakage.

screenshot_25-01-15_09:49:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant