Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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:
    984
    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?