Closed fallenatlas closed 3 months ago
PR Preview Action v1.4.7
:---:
:rocket: Deployed preview to https://GameDevTecnico.github.io/cubos/docs-preview/pr-1273/
on branch gh-pages
at 2024-06-30 13:49 UTC
Attention: Patch coverage is 0%
with 145 lines
in your changes missing coverage. Please review.
Project coverage is 40.54%. Comparing base (
8627172
) to head (2bf3064
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Oh boy...
Transition from XPBD solver to TGS solver.
Much of the solver for the penetration constraints was changed, we now make corrections based on impulses, based mainly on the equations for conservation of momentum with some bias proportional to the penetration which will work to separate the particles.
Collisions also work as soft constraints now, the values might need some tweaking in the future but they seem ok for now.
The integration also had to be changed and is now under the solver, because it just makes more sense.
The new loop is as follows:
Currently the impulses are enough only to separate the particles, this means that some collisions may not look as expected because everything is perfectly inelastic. Elastic and inelastic collisions will come with restitution which should be the next PR.
Also of note that stacks of more than 2 particles aren't very good yet, so the complex physics sample won't look the best.
Checklist