-
Notifications
You must be signed in to change notification settings - Fork 34
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
Physics Materials #1294
Physics Materials #1294
Conversation
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1294 +/- ##
==========================================
- Coverage 36.36% 36.36% -0.01%
==========================================
Files 393 393
Lines 31434 31467 +33
==========================================
+ Hits 11432 11442 +10
- Misses 20002 20025 +23 ☔ View full report in Codecov by Sentry. |
dbaa377
to
749ae95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a minor observation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM! Pointed out some nitpicks, feel free to merge it after resolving those
0926b64
to
fe467ff
Compare
Description
Add PhysicsMaterial component which allows to customize the behaviour of physics objects by changing their friction coefficient and bounciness. How the values of each are mixed to determine the value to use in the collision resolution can also be customized by choosing between 4 methods, which are some of the most common methods found online. This is inspired by Unity and Unreal which also do this. What the best is will depend on the use case, so I believe that this is better than only letting 1 method.
What some use (restitution only): https://stackoverflow.com/questions/1678908/applying-coefficient-of-restitution-in-a-collision-resolution-method
Unity: https://docs.unity3d.com/Manual/collider-surfaces-combine.html
Unreal: https://dev.epicgames.com/documentation/en-us/unreal-engine/physical-materials-reference-for-unreal-engine
Checklist