Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

How to stop following/rendering remote game object when using interest groups

$
0
0
Hi!

I am developing a PoC with "One big world" that is meant to have many (100-200) players who can interact. The world has various architectural rooms (all one Unity scene and all one Photon Room). I call the architectural rooms "Areas". The interest groups are set up by attaching colliders to the areas, so when a player moves into a new area, they adjust their interest groups accordingly.

All of that is working fine with PhotonTransformView and PhotonVoice, with one hitch: When a player leaves an area, he is till visible to the other players in that area at the place where he left the area (usually a doorway). Since the player is no longer in the interest group, using IPunObservable callbacks doesn't work. I have tried to send messages via RPC calls but having issues with that approach. Before I debug further, wondering if there is a better solution?

Also wondering, when I do get the info that the player has left the area, is the best practice to SetActive (false) on that gameobject, or is there another technique for making that player disappear until they rejoin the area.

Thanks

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>