Fix: Friction disappears when manually applying gravity #224#156
Fix: Friction disappears when manually applying gravity #224#156marcofugaro merged 6 commits intopmndrs:masterfrom
Conversation
|
cc @marcofugaro @codynova (you surface as recent contributors, hoping I can get a review from one of you, thank you!) |
|
Thanks for this! 🙂 One comment from me: In this PR, If Maybe we could add properties like the Let me know what you think! |
|
@isaac-mason thanks for having a look! Ah yes, thank you! Great catch. The flags are a good idea, though I would prefer an approach that kept the config matrix as small and simple as possible. How about this:
This way, current behavior is maintained and backwards compatibility is ensured while still allowing users to override friction gravity, if they need to. When the average user changed What do you think? |
|
I updated with the suggestion above. Also, I noticed that |
|
@chnicoloso that sounds reasonable to me! I'll give this another read-through shortly 🙂 |
|
I believe right now builds are committed to |
|
Implementation LGTM! |
|
Could anyone else also give this a review? @marcofugaro / @codynova |
|
Thanks @isaac-mason! I updated the |
|
i can merge and publish if you guys want? i don't understand the code but from looking at the images it behaves correct. |
|
Thanks @drcmda! That would be great - so you don't need me to build and commit |
|
Yeah, an example would be useful, but maybe in a future PR if someone wants |
Addresses:
schteppe#224
Reuses pattern from p2.js:
https://github.com/schteppe/p2.js/blob/master/src/world/World.js#L88-L92
Before:

After:
