We are trying to spatialize voice chat. When we create/join a session we are able to get the AudioComponents related to the users’ voices. We are also able to know which AudioComponent belongs to which Character. We are having problems in spatialization.
The problem is not the spatialization itself, nor the attenuation. We are able to hear the voice originating from the Character’s position and attenuated based on the Character’s distance.
I’ll try to describe our issue:
- We attach the AudioComponent to the related Character’s RootComponent
- If the user to which that character belongs stops talking, when it start to talk again its voice has moved with him
- If the user never stops talking, its voice remains where he was when he started to talk…
We tried to draw a Debug sphere in the place where the AudioComponent is, and it correctly follows the Character (to which it is attached) also while the player is talking. So the problem is not the “attaching”; the problem is that the voice does not originate from the Character’s position (unless the player stops and starts to talk again).
Is there something we are forgetting to have the AudioComponent behaving correctly?