i have a car, wiith a horn, and this script:
function Update () {
if (Input.GetKey(KeyCode.H)) {
if(!audio.isPlaying) {
audio.loop = true;
audio.Play();
}
} else {
audio.Stop();
}
}
but when i drive at high speeds, the sound becomes very distorted. How can i fix this?
Edit->ProjectSettings->Physics(or was it Audio?)->DopplerFactor
However, that parameter is global, so it will affect all your sounds and all your scenes.
If you make sure your models are in meters (e.g., the car should be around 3-5 worldcoords long), the doppler effect should be realistic.
If that does not help you, we'd need some more info about your problem: What kind of distortion? Does the sound change pitch? Is it too loud? Is it choppy? Does your car have a driving sound and does that have the same problem? etc.