Tech-savvy programmers

We are an independent game studio who wants to share code that might be useful.

Our Asset Store Packages

 

Multi Audio Source

15,99 €

The Problem

Unity does not allow to have multiple Audio Listeners, which makes sense in most of the games - you have only one player (per physical machine) that is able to _hear_ sounds. The problem shows up when you have local co-op game with multiple players on single machine.

The Solution

The solution in big picture is to create one AudioListener that's located in the middle and same number of AudioSources as there are MultiAudioSource. Each time interval real audio sources moves in a way to mimic what would hear the closest player to the game object with the MultiAudioSource.

 
Contact us: @Napad_Games | tech@napad.games