I have a 3D Unity game where four players are able to traverse the environment, making sound while doing so. The camera tries to frame all of them, and as such might be really close to them, or really far away.
What I want is that when a player is to the left of the visible area, the sound is played on the left. The sounds should not get less loud when the camera is further away, they should keep their volume.
My initial idea was to place the listener in the center of all players, though this would make sounds louder of players closer to the center, which should not be the case. All player sounds should have the same volume always, I only want them to pan to the left and right depending on where they happen. Ideally, sounds outside of the visible area are less loud, which I could check through the viewport position of sounds.
Any idea on how this could be achieved?
Thanks in advance for any help, I am really stuck on how to approach this