- Home /
Sound getting deeper
Hey I have someone talking in my game, and it is connected to an audio source. When I play it, the voice gets deeper and deeper how do I stop this?
Answer by Design3.com · Apr 09, 2010 at 11:56 PM
You can access the Audio Manager at Edit-->Project Settings-->Audio; check to see that the Doppler Scale is 1. Not sure if that could be it, but if the doppler effect was exaggerated, I wonder if it might cause something like this.
Nah, this will affect doppler for the entire game. Take a look at this one ins$$anonymous$$d:
http://unity3d.com/support/documentation/ScriptReference/AudioSource-velocityUpdate$$anonymous$$ode.html
Answer by alexnode · Apr 09, 2010 at 10:34 PM
I am not sure, but I think it plays multiple times the same audio file. If you have the audio activated by a trigger, don't activate it onTriggerStay but onTriggerEnter ... or avoid to play it every frame from function Update().
var voiceOver : AudioClip;
function OnTriggerEnter (hit:Collider) { if(hit.gameObject.tag == "speak" ) {
audio.PlayOneShot(voiceOver);
}
}
drag this .js script in your first person controller and assign a sound in the script from the inspector, make sure that you have an audio source in your controller and add a trigger tagged speak. And it should work.
you might want to add a timer so the sound won't play again if you enter the trigger multiple times. You can do things like that by pressing buttons on your keyboard or activate them when you press a GUI button .
Your answer
![](https://koobas.hobune.stream/wayback/20220612154614im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Audio Not Always Playing 3 Answers
How to stop an Audio Clip without an Audio Source? 1 Answer
Best way to play audio sound effects 1 Answer
3D Sound Max Distance Not Working. 0 Answers