Open ioxu opened 1 year ago
Not quite sure what to do here because timestep is taken into account ONLY when calculating the coefficients. Maybe measure the ideal delta/timestep and initialise at the start -
What about
in calculate*
functions track last delta, ad if new delta is different, re-call initialise
with new delta give or take epsilon?
... let's try that ^
Seems to work.
With a delta diff of about 0.018, it doesn't _reinit
too often, but definitely adapts to slowmotion mode.
not working, threshold working in reverse? Want to detect large relative change in delta. Change from fast delta to slow delta, is small.
Manifests especially in slowmotion timestep mode. Can easily see springs in player's waist calc at the incorrect rate.
multiplied in in
_calc_damped_spring_motion_params
add to struct_damped_spring_motion_params
, and passed through calls tocalculate*(
?