i made a sound file and attached it to the terrain it plays fine if you stand in one place . This is a third person camera set up and the problem im having is when you move the mouse around the char the sound gets distorted. its a background effect sound.
How can i get around this so it dosent get distorted.
Kinda sounds like the “distortion” you’re describing (assuming it’s not the “distortion audio effect” in Unity Pro) is either:
The Doppler Effect option, wherein the pitch of your sound gets higher and lower when you’re moving towards and away from it.
The nature of 3D sound coming from a certain direction, so if you move your character around, the sound spins around in your headphones, getting muffled when you’re not facing it.
If #1 seems right, it’s probably best to turn off the doppler effect (slider in the Audio Source settings).
If #2 seems right, attach the sound to your main character; this way, you cannot face “away” from it at all, it will always be coming out of both speakers fully and clearly. EDIT: the answer about Panning Attenuation sounds like a good fix for this too.
Probably it’s the Doppler effect: reduce the doppler parameter to zero in the AudioSource. Remeber to extend the rolloff curve to a big value - say, 1000 and 2000 (start and end attenuation values) to be able to hear the sound everywhere.
That would disable Panning and Attenuation.
The means MinDistance and MaxDistance become void, as well, which is what you’d want for background music - sourceless and always the same volume.