Different levels of communication with Photon Voice
in Photon Voice
Hi! We are working with Photon to create a multiplayer experience with communication. We want to have different levels of communication with Photon Voice and 3D sound from Unity, so we have 3 different buttons :
-Turn microphone off --> Listen everyone but no one can listen to me
-Microphone for short distance -> Listen everyone but just people near me can listen to me
-Microphone for long distance -> Listen everyone and everyone can listen to me
What we are doing right now is sending RPCs’ when a button is clicked and changing the max distance of the AudioSource that is located in the prefab of the player but this is not working. Is there a way to do this and it is not necessary to do this with MaxDistance, we just thought that was easier. Thank you!
Code Screenshot --> https://drive.google.com/file/d/1pTNow4a69ideeYLNQ-08aoe0Ktys25Lx/view?usp=sharing
-Turn microphone off --> Listen everyone but no one can listen to me
-Microphone for short distance -> Listen everyone but just people near me can listen to me
-Microphone for long distance -> Listen everyone and everyone can listen to me
What we are doing right now is sending RPCs’ when a button is clicked and changing the max distance of the AudioSource that is located in the prefab of the player but this is not working. Is there a way to do this and it is not necessary to do this with MaxDistance, we just thought that was easier. Thank you!
Code Screenshot --> https://drive.google.com/file/d/1pTNow4a69ideeYLNQ-08aoe0Ktys25Lx/view?usp=sharing
0
Comments
Thank you for choosing Photon!
Maybe you need to also change other AudioSource 3D settings like spatialBlend etc. and not only MaxDistance.
Otherwise, you can do this differently, using interest groups, see DemoProximityVoiceChat in the package especially ProximityVoiceTrigger script.
@JohnTube I saw the demo but I found it really confusing. Can you provide an example using interest groups (2 groups) in which the player can:
1. Listen to groups 0 and 1. Talk to group 0
2. Listen to groups 0 and 1. Talk to group 1
Sorry about this, how so? how can we lift the confusion?
Listen to groups 0 and 1: (0 is subscribed to by default and is for broadcast as you can't unsubscribe from it)
Talk to group 0 (default)
Talk to group 1:
note: