Difficulty setting up Interest Groups for Photon Voice

Options
GeekTurtle
edited May 2020 in Photon Voice
Hello, I am trying to set private areas in world so that when you get in that area you can only hear and talk to the people in that specific area, but nothing I try seems to work. The interest group does change in the inspector when I enter the zone, but I can still hear and talk to everyone outside that zone.

I also noticed that I get this error when entering the private zone for the first time:
Operation ChangeGroups (248) not allowed on current server (NameServer).

Here's a sample of last thing I tried. This script is attached to the player object that are instantiated when entering the room.
public void OnTriggerEnter(Collider other) // When entering private room
{
if (other.tag == "Room")
{
roomNumber = other.gameObject.GetComponent<ZoneSettings>().zoneNumber;
PhotonVoiceNetwork.Instance.Client.OpChangeGroups(null, new byte[1] { roomNumber });
recorder.InterestGroup = roomNumber;
Debug.Log("Entered room: " + roomNumber);
}
}

public void OnTriggerExit(Collider other) // When getting out of private room
{
if (other.tag == "Room")
{
Debug.Log("Out of room: " + roomNumber);
PhotonVoiceNetwork.Instance.Client.OpChangeGroups(new byte[1] { roomNumber }, null);
roomNumber = 0;
recorder.InterestGroup = roomNumber;
}

}

Thanks

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited May 2020
    Options
    Hi @GeekTurtle,
    Operation ChangeGroups (248) not allowed on current server (NameServer)
    This means you are trying to call ChangeGroups operation too early (while not joined to a room yet).

    The Voice client needs to be in state Joined.

    Check the DemoProximityVoiceChat in the package and especially the ProximityVoiceTrigger script.