Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by drastick · Dec 06, 2010 at 03:34 AM · 3daudiosoundwwwogg

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Sren Christiansen · Jan 05, 2011 at 12:20 PM

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)

-Sren

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by Clement_Shimizu · Aug 16, 2014 at 01:08 AM

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 http://docs.unity3d.com/ScriptReference/WWW.GetAudioClip.html

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Tony-Sparrow · Jan 26, 2016 at 02:41 AM 0
Share

Thanks you, it's work!!

avatar image
-1

Answer by xtnz · Jun 23, 2011 at 06:03 PM

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.spread=0.25; audio.minDistance=1; audio.minDistance=10; audio.ignoreListenerVolume=true;
audio.panLevel = 1f;
audio.Play(); }

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

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sren Christiansen · Jul 13, 2011 at 12:58 PM 0
Share

panLevel, should be 0.0f (not 1f)

avatar image Waz · Jul 13, 2011 at 01:03 PM 0
Share

Not an answer. If you have a question, Ask it, don't add an "Answer" to an old question.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Why is Unity3d strictly using PCM Buffer size with 32bit floating in AudioClip? 1 Answer

How do I make my sound work in proper 3D space for VR 1 Answer

3D Sound Max Distance Not Working. 0 Answers

Best practice: URL address for storing streamed music files 1 Answer

Playing .Ogg audio backwards? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges