- Home /
Making Enemy Audio quieter
How do I make the audio from a enemy fade away as i move further away from it?
I've tried to use the 3D sound settings in the audio source but the enemy audio is the same no matter how far away it is from the player
Comment
Best Answer
Answer by Casiell · Aug 28, 2018 at 06:17 AM
3D audio definietly works, your settings may be wrong, you should check that.
Outside of that, AudioSource has volume property you can use. Just get Vector3.Distance(Player.transform.position, Enemy.transform.position) and set volume based on that.
Your answer
Follow this Question
Related Questions
playclipatpoint set default 2d (default audio is 3d) 0 Answers
TOD script editing (sounds) 0 Answers
Audio Fade Trigger Script - Coroutine Bug 1 Answer
How to make sound effects ??? 2 Answers
Can't play multiple sounds at once 2 Answers