Closed janhohenheim closed 1 year ago
This is the problem:
let dampening_force = relative_velocity * config.spring_dampening;
The dampening force is linear with the velocity, but it's an acceleration rather than a velocity so if a frame is long its effects are drastic. I'll have to multiply it by the frame duration - which means that spring_dampening
will have to be re-calibrated, making this a breaking change.
Wow, good job on finding the problem this quickly! :)
Right after reporting #2, I tabbed back into the 3D platforming example and found the character wayyyy up in the sky. It took them a while to fall down to the ground. I don't know if this is a consequence of #2, caused by the general lag of me having other stuff open on my computer at the same time, the tabbing out or the waiting.
Repro steps: