engine almost working, backup before adding gas types.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace FluidSim.Core
|
||||
scaleFactor = 1.0 / (4.0 * Math.PI * listenerDistanceMeters);
|
||||
|
||||
// Smoothing time constant for the derivative: 10 ms (much smoother)
|
||||
double tau = 0.010; // 10 ms
|
||||
double tau = 0.005; // 10 ms
|
||||
alpha = Math.Exp(-dt / tau);
|
||||
|
||||
// Low‑pass time constant for the mass flow: 5 ms (kneecap high‑freq directly)
|
||||
@@ -49,7 +49,7 @@ namespace FluidSim.Core
|
||||
double pressure = smoothDMdt * scaleFactor * Gain;
|
||||
|
||||
// Soft clip to ±1 (should rarely trigger now)
|
||||
return (float)Math.Tanh(pressure);
|
||||
return (float)pressure;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user