Viewing 1 reply thread
  • Author
    • #2152


      I’m trying to create a multiplayer (2 players) game, in which every player has a pair of headphones.
      Each player should hear the sound like received at their position/transform.

      Could that maybe be done using two RealSpace3D AudioListener objects, which each generate sound from different positions for each player?
      One listener could then output audio to the (default) front left/right speaker port, and the other one to one of the surround output ports, like rear left/right speakers (both these ports would have a stereo headset/headphones connected).

      This would be an awesome addition to the RealSpace3D plugin.


      • This topic was modified 4 years, 4 months ago by Chrisu.
      • This topic was modified 4 years, 4 months ago by Chrisu.
    • #2155

      Hello Chrisu,

      The RS3D AudioListener does no processing, it is only used for selecting HRTFs (Head Related Transfer Function) data set and head, neck, torso params. Unity’s AudioListener is still processing and must be in the scene. Unity doesn’t allow for multiple AudioListeners in a scene (2+ AudioListeners will be ignored and you will receive warning messages in the console window). However, in your application you can write a script (I haven’t tried this but should work…when I get some free cycles (hmmmnnn…when will that be 😉 ) I will give it a try) that checks if the network view is yours…

      (Sorry about formatting)

      private Camera theCamera;

      void Init()
      theCamera = Camera.main;

      void Start()
      { = true;
      theCamera.GetComponent(AudioListener).enabled = true;
      GetComponent(MouseLook).enabled = false; = false;
      theCamera.GetComponent(AudioListener).enabled = false;

      Something like that should work.


Viewing 1 reply thread
  • You must be logged in to reply to this topic.