Photon Voice Speaker not following Player's position

Hello,

We have a VR multiplayer app that uses Photon voice 2 to allow audio communication between users and is working fine.

We created a second app using the same setup for it and we do have audio communication but it seems like the audio sources for all the players are not following the player's avatar but it's stuck to the location of the GameObject that contains the PhotonVoiceNetwork component.

I have tried recreating both the PhotonVoiceNetwork Object from scratch and the Avatar with its Speaker and audio source but same result.

Please let me know if you need any other additional information to figure out what could be the problem here.

FYI, the other app that doesn't have any problem uses PhotonVoice v2.21 and the new one uses the latest version 2.24.1

Thanks for your help,

Martin.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Martancho,

    Thank you for choosing Photon!

    If the Speaker is attached to the Avatar's root GameObject or one of its children then it will have a position relative to the Avatar's GameObject and move with it.
    We don't do anything special for audio positioning we rely on Unity for this.
    It's about the distance between AudioSource and AudioListener components.

    Maybe you mean there is an issue with 3D audio, check AudioSource.spatialBlend value it needs to be 1f for 3D.
  • Hi @Martancho

    Did you find a solution? I`m experiencing the same issue

  • I don't usually resurrect old messages but I can't get a definite reply from any other source. I don't have an issue with the static setting of Spatial Blend. If I set it to 3D players can hear others who are nearby, less so for players further away.

    If I set it to 2D (in the editor and build) then as one would expect all the players hear each other regardless of distance.

    Doing this dynamically from within the game however has no effect. I am setting the players via a RPC call and have other RPC calls working fine. Now I simply need to know if a) Spatial Blend can be set dynamically and b) it perhaps requires some sort of "reconnect" or "reset" method call after setting to make it take effect.

    Maybe it is a Unity thing or could it be a Voice thing?

  • Changing AudioSource Spatial Blend dynamically works for me at least in editor. Photon Voice just uses AudioSource for playback. It can't change AudioSource basic behavior.

    Do you adjust the correct instance of AudioSource? Can you change volume, pan and other parameters of your AudioSource?