Search Unity

Sound Distance on Network environment.

Discussion in 'Multiplayer' started by Smireles, Aug 6, 2008.

  1. Smireles

    Smireles

    Joined:
    Jun 20, 2008
    Posts:
    38
    Hello.

    Today ive been struggling with the sound.
    I never noticed this because i was playing with two instances of the game in the same pc. but today i tried it on different machines.

    Even tho each player shoot, run, die, in their own. each time one person shoot, everyone can listen to the sound.

    Somehow the audiosource is playing my audioclip to all clients. at 1 volumen (full power). Its clear that im doing something wrong, and im kinnda stuck here and im not looking outside of the box.

    My quick guess would be that each remote player is playing the sound on my audiosource. but still... i already used a rpc in triggering the "fire" command.


    Please enlight me.

    NOTE: My explosions are working fine with distances.
    :(
     
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    So that does mean they're mono and thus doing correct "3D audio"? If that had been the issue, it would be easy to fix: Just change import settings to "mono" and you're done...

    But as you say they're working fine with "distances", this may not be it, and then it's really weird ... what objects are the Audio Sources attached to?

    Sunny regards,
    Jashan
     
  3. Smireles

    Smireles

    Joined:
    Jun 20, 2008
    Posts:
    38
    Hola Jashan!

    You were right, we recorded our sounds with the default settings and never though about how they would behave in a network environment.

    We forced mono audio for our sounds and magicly everything started to work just fine.

    Right in the spot man, thank you very much.
     
  4. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    You're welcome!