Loading ogg though WWW results in 3D Sound, need as 2D...

How do I force though script the loaded audio to be set as 2D sound?

I'm trying try load in our music file to play in the background. When loading from WWW source I can't seem to find the option to set the audio as a 2D sound, it is intended to be an Omni sound but ends up being a 3D sound.

I know this question is a bit old, but I want to update the answer to be the correct answer.

The answer from XTNZ and SREN are both not ideal because the audio clip doesn’t sound as good as if it was a 2D sound. For example 5.1 audio will sound muffled if you play it back as 3D sound with panelLevel at 0.

The correct way of doing it is using the fuction WWW.GetAudioClip with 3D sound parameter set to false.
Please review the docs here

Hi, This will be an option in 3.2. For now use .panLevel = 0.0f on the audiosource playing the clip (this will make it play in 2D)


Jee… This means I am doing something wrong. However the sound is constant nomather how far the camera (with listener) is from the source:

var download = new WWW (path);
yield download;
var clip : AudioClip = download.oggVorbis;
if (clip != null) {
audio.clip = clip;
audio.rolloffMode = AudioRolloffMode.Logarithmic;
audio.panLevel = 1f;

Any clue?
Is there any way of forcing a sound to become 3d?