Handling audio in split screen? (Viewports)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JohnTator

I’ve been working on getting a split screen setup in my game and one thing that seems to go completely unmentioned in guides is handling audio. The problem being that it seems only one audio listener can be active at a time.

This is quite a problem, because that means its only possible to listen to sound around one of the players. I know a possible solution is to make all sounds non-spacial, but in my case that would cause problems in online multiplayer.

Does anyone know of any weird trick to get two or more listeners listening at once? Or if there’s something simple that I’m missing?

Could you calculate it manually by checking the distance from the sound source to the “listeners”, and adjust the volume based on the distance to the closest (which will hear it the loudest)?

SteveSmith | 2022-09-20 19:27