- Home /
Audio zones for ambient sounds
I'm new to Unity3D (3.1 Pro, OS X), and am wondering what best practice is for implementing audio zones for ambient sounds. I can't find any built-in support for it; neither can I find any suitable tools, classes or scripts on the net.
What I want to do is have a sound clip play when the player enters a specific area, such as a house or a large outdoor area, then stop when leaving the area, restoring any previously played ambient sound.
So, is the best way to spawn a new object on the player, triggering the on/off/replace by triggers on meshes positioned over the area? Multiple meshes would have to be used, since the areas might be irregular or consist of composite geometry. Ideally, the sound should fade in and out when the border is reached, but the speed of movement of the player should not have any bearing on the fade speed.
Or do I simply create multiple sound sources, and position them where needed, all playing the same clip, and with custom attenuation curves, no Doppler, etc?
Thanks in advance, / Peter
Answer by DaveA · Mar 26, 2012 at 07:27 AM
Working on it, what do you think? (click link for description/screenshots): Visual Audio Zones
Your answer
![](https://koobas.hobune.stream/wayback/20220613085650im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Calculating rhythm of any music? 3 Answers
How To Turn Off Sound For Certain Objects? 1 Answer
unity won't play sounds i implement 1 Answer
Audio not coming out of speakers 1 Answer