- Home /
Background music lowers when I use AudioSource.PlayClipAtPoint()
Hello
I'm developing a 2D game in Unity with some friends, and we have an AudioSource component added to the camera which loops the background music. Whenever we play an AudioClip with AudioSource.PlayClipAtPoint() from script, the music attached to the camera lowers its volume for about 3 seconds and then comes back. All audioclips are 2D. Does anyone know why this is occuring?
Thanks in advance
Answer by morvi · Dec 16, 2015 at 08:36 AM
Hmm...my first thought when reading your question was "Why do you want to use a 3D-sound-function with a 2D soundclip in a 2D game"?
How about using`PlayOneShot()` instead of PlayClipAtPoint()
since your clips are configured for 2D-mode? PlayClipAtPoint()
is considered to be used to make a sound at a specific point in a 3D-world-space and that shouldn't be the case in your game - especially with 2D clips.