-
Notifications
You must be signed in to change notification settings - Fork 132
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
Fix: Friction disappears when manually applying gravity #224 #156
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 |
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.
Makes sense, thanks!
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: