more realistic settings, changed engine sound

This commit is contained in:
max
2026-03-26 12:12:11 +01:00
parent e156122357
commit fcfe67b02a
4 changed files with 5 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ namespace Car_simulation.Audio
// Engine harmonics
private readonly float[] _harmonicMultiples = { 1f, 2f, 3f, 4f };
private readonly float[] _harmonicAmps = { 0.3f, 0.6f, 0.4f, 0.2f };
private readonly float[] _harmonicAmps = { 0.3f, 0.6f, 0.2f, 0.4f };
private readonly float[] _harmonicPhases = new float[4];
public EngineSound()
@@ -34,7 +34,7 @@ namespace Car_simulation.Audio
{
_currentRPM = rpm;
_currentThrottle = throttle;
_volume = 0.1f + 0.4f * throttle;
_volume = 0.1f + 2e-4f * throttle * rpm;
}
public void StartSound()