Hi, we are trying to use the new UVoipTalker
(available since UE 4.19) in order to have users’ voices spatialized.
We’ve already modified some previous versions of the engine (until 4.18.3) to have the correct association between player id and player voice’s AudioComponent
. Our modifications are not appliable anymore with UE 4.19, because of some modifications on FRemoteTalkerDataImpl
.
So, we are trying to use the new native way to spatialize users’ voices.
The API seems to be simple, but what we obtain is simply non-spatialized voices.
Having the player character, we do the following things in its Event BeginPlay:
We do the following for each player character spawned on each machine (client or server): we create the UVoipTalker and assign it the VoiceSettings (with the component to which to attach the voice and the attenuation settings). We already use the same attenuation settings before, by attaching them to the same Avatar Head, and it worked perfectly.
Do you see all the nodes execute? The controller only exists on the server, so that part should fail. And I think PlayerState has a replication delay sometimes so you may need to continuously check it.
Also, even if PlayerState has replicated over some of those nodes will fail if PlayerState’s unique net id hasn’t replicated yet.
Also just found that UVOIPTalker uses a global map inside, so you can’t test it with a bunch of play-in-editor multiplayer instances or they will clash with each other and overwrite entries in the map. You have to test by running the game outside of the editor.
(But you can probably get by with two PIE instances since you won’t put your own local player into the map on each instance and there will be no clash)
Did you progress with this?
I’m running into a similar issue that (I think) I’ve solved by changing the SoundAttenuation settings for the sound, and disabling “Enable Volume Attenuation” and hacking some psuedo-attenuation (simple volume-falloff based on location) into the Level Blueprint.
Doing it this way gives me both attenuation and spatialisation - nothing else so far has successfully given me both.