Split bouncy and resting contacts (take 2) - #114
Merged
Conversation
26 tasks
10 tasks
sebcrozet
requested changes
Feb 18, 2021
If a contact is new (previous impluse = 0), then we treat it as bouncy (respecting restitution). If the contact is old we treat it as resting. Exceptions for restitutions <=0 and >= 1.
emilk
force-pushed
the
split-contacts-2
branch
from
February 18, 2021 16:58
f79dcf9 to
5e7eedc
Compare
sebcrozet
approved these changes
Feb 18, 2021
Member
|
Thanks! |
Contributor
Author
|
🥳 |
jamespohalloran
pushed a commit
to jamespohalloran/rapier
that referenced
this pull request
Apr 26, 2025
…y-release Add canary release
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.
If a contact is new (previous impulse = 0), then we treat it as bouncy (respecting restitution). If the contact is old we treat it as resting.
This allows us to remove the
restitution_velocity_thresholdparameter.Special cases:
restitution <= 0is always treated as restingrestitution >= 1is always treated as bouncingTest
A 0.9 restitution ball bouncing on ground with the same (very high) restitution.
Before
Previously an arbitrary
restitution_velocity_thresholdcutoff led to an abrupt end to bounces:After
Bounces keep going up to nyquist limit, into a smooth transition to rest: