Fix jump height
Changes to the formulas to calculate jump height
Fix for #229 (closed)
So far:
- Exponential interpolation used for linear damping in
phys.rs::integrate_forces
- An approximation of the integral of the linear damping formula is used to adjust the position in
phys.rs::Sys::run
It's a good approximation and allows for jumping two blocks at 15 fps, but could use some adjustment to make it exact. Possible solutions:
- fix the time step and run each tick multiple times per frame.
- find an exact solution to the (linear damping equation)[https://en.wikipedia.org/wiki/Damping_ratio#Derivation]
- Modify the existing collision code.
Edited by Andrew Pritchard