Voice Chat is not attenuating

I found the solution on my own but then forgot how I solved it and couldn’t complete this thread. But, I FINALLY remembered!

There were two things I was doing wrong.

  1. In my original code, I thought I was attaching the VOIPTalker to my player character when I casted. However, apparently, the Add VOIPTalker node immediately creates and attaches the component to the blueprint that calls it. This means the Talker was being attached to my controller blueprint and the only thing I was attaching to my character were the settings. I fixed this by moving all my voice chat init into my character blueprint and removing the cast. I also changed from attaching it from my camera to my base component.

  2. Secondly, I also forgot to consider replication. If you think about it, if you have two people in a game, then you need a VOIPTalker for all player characters a client is connected to. But if you create the VOIPTalker once on the client, that can only create one VOIPTalker. To fix this I made a multicast, so every character sends the event to the server, and then the server creates a VOIP for that player for all connected clients.

Here’s how I’m replicating the voice initialization in the character blueprint.