-
Notifications
You must be signed in to change notification settings - Fork 638
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
Major fixes #113
base: master
Are you sure you want to change the base?
Major fixes #113
Conversation
Manamongods
commented
Aug 31, 2021
•
edited
Loading
edited
- Several major fixes to BeginContact and EndContact
- Makes fixture<->particle collision distance use radius instead of diameter, and if the extra distance was intentional, the setting b2_fixtureParticleCollisionRadiusScaler gives control over this instead of it being a constant 2.
- Makes b2ParticleSystem forces clear in b2World::ClearForces(), the same way that b2Body forces are cleared. This fixes forces from being applied at only the first particleIteration.
- SolveCollision and SolveBarrier relied on (delayed) forces to be cleared immediately, in order to generate the contacts they desire, so I added m_impulseBuffer for them to use, which clears immediately.
- Fixes elastic directional bias. I believe that this bias was more noticeable with smaller time steps.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
b28b6a5
to
2d2b46c
Compare
- Several fixes to BeginContact and EndContact - Makes fixture<->particle collision distance use radius instead of diameter - Makes b2ParticleSystem forces clear in b2World::ClearForces() - Fixes elastic directional bias
SolveCollision and SolveBarrier needed forces to clear differently than how b2World clears forces, so when I fixed the way particle forces cleared, it broke SolveCollision and SolveBarrier. This adds the m_impulseBuffer, which clears immediately, which is what SolveCollision and SolveBarrier now use.
This makes the distance correctly calculated when it comes to corners.