When a new player joins, anyone already in the game and talking will be heard by the new player regardless of distance (attenuation does not work for pre-existing players). This persists until the talking player toggles speaking off and on again; then attenuation and distance-based volume works again. The workaround I’m using for now is to briefly toggle all players’ speaking off and on whenever a new player joins (with a 1 sec between toggling off and back on in order for it to take effect), but that seems very messy for a final solution. It looks like what’s happening is that if you join a game in progress, the audio is already playing and cannot be attenuated - or another way to put it, attenuation only applies to audio after you join.
I’m using the approach described here:
It seems like it’d be a noticable issue for any game using the built-in chat functionality if every new player briefly gets bombarded with the chat of everyone else. Has anyone else come across this issue before or has any ideas how to solve it?
Note that the issue is inconsistent. Sometimes the attenuation works fine for a newly joined player, but then the next person that joins has the issue. When testing, try joining and rejoining a few times.
After talking with Matt from CouchLearn to see why he hasn’t encountered the issue, another workaround seems to be to mute and unmute the player in beginplay/endplay events. That also resets the VOIP to take account of the attenuation. Calling RemoveAllRemoteTalkers also seems to reset the VOIP to recognize the attenuation.
So what seems to be happening is if you don’t toggle or call mute/unmute in the beginplay, a player that is already speaking before creates an audio stream that isn’t affected by attenuation that is added perhaps a few frames later in the beginplay call.
Make sure you wait for playerstate to be ready (check if it’s valid in a loop). I have the voice submix muted before the game connects to get rid of the initial pop in voices before the mute can kick in, then unmute a few seconds later.
Hi i also have same issue, did you find any solutions?
As you say, when new player join the game, i called muteRemoteTalker() in beginplay() event
But, in my case… nothing was changed. i’m making with C++ and using dedicated server.
So, do you want me to call the mute function before connecting it to the dedicated server?, i actually Register VOIPTalker in OnRep_PlayerState(). because, as you know, PlayerState may not be initialized at the time of the BeginPlay() call. I’m not an English speaking person, I can’t understand your answer well. Can you explain it in detail? I’m sorry to bother you
The mute function per player needs to be called after connection. However, that leaves a split second delay where you might get overwhelmed by voices on connect. To prevent that, you additionally mute the overall voice submix (look up UE4 submixes). It’s unnecessarily complicated, but that’s what we have in UE4 unfortunately. There’s also the part that I’m not sure if players continue to broadcast when muted; I worry that’ll eat up network bandwidth.
A few years too late however I appear to have fixed this issue my adding a “Do Once” node at the start of my VOIP Initialization event which is called on begin play inside my player pawn. Making this reply in hopes that someone will see it one day and not have to struggle finding a solution for days like I have done
UPDATE: This solution is no longer functioning after some more testing. I have ended up just purchasing a voice chat plugin. It is much simpler and setting up VC properly using the native implementation just appears to be too much of a hassle and is not worth the time.
I still can’t get this to work. All people connected can hear all, as if they were standing next to each other. meaning no attenuation is applied. Im on UE5.3.2. Any suggestions or working solutions are welcome.
I have the same problem as Jonas_Molgaard on UE 5.2. Never had this issue with UE 4.27. Tried the fixes suggested above, but attenuation/proximity doesn’t work for me.
I ended up using this and modifying it to my needs. The Attenuation settings work there and if you’re BP-Only, there’s a good chance you will get what you need with it. If you’re a bit into c++, I’d say you should do some cleanup of the code, but that’s my personal oppinion: Cross-Platform Voice Chat Pro in Code Plugins - UE Marketplace (unrealengine.com)