- Home /
sound distance between camera and audio source
How do I change the volume of the audio source depending on how far away the camera is so sounds won't seem right next to you, when they are really across the level. Do I have to get the distance between every audio source and the camera and adjust the volume depending on the distance. Or is there an easier way to do it.
Answer by Statement · Mar 26, 2011 at 06:32 PM
This is calculated automatically when you make use of 3d sounds and have proper distances between source and listener.
You need to respect the scale of units for audio to function properly. The same applies to physics.
Answer by Sren Christiansen · Apr 01, 2011 at 06:43 PM
Unity is doing this for you automatically, if you import the sound as 3D. You can tweak the details of the fall off in the curves in 3D options on the AudioSource.
Your answer
Follow this Question
Related Questions
Volume rolloff: Distance to listener not changing. 3 Answers
3D Sound Max Distance Not Working. 0 Answers
Muting Audio 2 Answers
Audio mixed, blending on distance ? 1 Answer
Inconsistent ReverbZone / AudioSource.volume behavior 2 Answers