How can we filter players in a room from server side while using PUN.

I want to filter players by their location in space, A player should only get the stream of messages from players near.

Best Answer


  • Tobias
    Tobias admin
    Answer ✓
  • AzhaMawaz
    edited January 29

    Hey @Tobias ,

    Thank you for your reply.

    Yeah, that will work for someone who needs discrete groups. What we need is to have a filter in real-time. so that if the range is 2.5km player1 is 2km away from player2 on the x-axis. and if player2 is 2km away from player3 then player1 shouldn't get messages from player3.and player2 will get messages from both players because both are in range.

    I think I will have to host a dedicated server to handle this with a socket connection. Do you this is what I should do?