Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Positional Sounds Don't 'roll off' anymore with Unity5

Discussion in 'Audio & Video' started by HandyManStudios, Mar 16, 2015.

  1. HandyManStudios

    HandyManStudios

    Joined:
    May 29, 2014
    Posts:
    17
    So, I updated my project to unity 5, it mostly was fine nothing really broke but a few shaders which I expected, but the thing that is really getting me is my audio is messed up, I have a bunch of 3d sounds that are using a lot throughout my game but now they are all playing as if you are standing ontop of all of them.

    I see that their is no longer a '3d' option for audio clip importing, I can only assume this is because the new audio system has changed how this work.
     
  2. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    You're the 127th to ask...

    AudioSource now has a spatialBlend parameter, which replaces 3D. Set it to 1f for full spatialisation.

    It is quite annoying that it defaults to 0f, but there you go.
     
  3. HandyManStudios

    HandyManStudios

    Joined:
    May 29, 2014
    Posts:
    17
    yea, I just figured it out myself, but thanks! Yea...it being defaulted to zero seems bad. Also the idea of moving it from the clip itself to an audio source also seems wrong.
     
  4. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    Well, that way you can play the same clip both in 3D and 2D. It's a property related to mixing, not to the actual audio data...
     
  5. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    play clip at point seems to set spatial blend to 0 which makes it pointless. Is there a way to make it inherit the properties of the audio source?