Fix low-pass filter and adapt to speed-up factor.
Low-pass filter should not use real-time, but simulation time to filter effects. Obey speed-up factor.
This commit is contained in:
parent
91c202e1cf
commit
8421d75cb9
1 changed files with 1 additions and 1 deletions
|
@ -270,7 +270,7 @@ var lowpass = {
|
|||
me.value = v;
|
||||
},
|
||||
_filter_: func(v) {
|
||||
var dt = getprop("/sim/time/delta-sec");
|
||||
var dt = getprop("/sim/time/delta-sec")*getprop("/sim/speed-up");
|
||||
var c = dt / (me.coeff + dt);
|
||||
me.value = v * c + me.value * (1 - c);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue