PhotonNetwork.Instantiate made players switching cameras !

Options
Hi everyone !

So here's my problem,
I have a game that is currently made of 3 scenes : connexion, menu and game. On the first scene, client connect to Photon and, if success, enter a name and then loads the menu scene. In this menu scene, the client can choice between creating a room with multiple options (mod, map, private, players count) or simply use matchmaker and then loads game scene.

Here comes the problem :

When a first client (that we will call "CLIENT A") creates a room, everything is fine : he can freely move, jump ... do whatever he can. But, when another client (that we will call "CLIENT B") joins the same room via matchmaking or private room search, everything is getting strange !
First, CLIENT A will control CLIENT B's camera and CLIENT B will control CLIENT A's camera, but they both still control the good game object (thanks to isMine property)

To resume, both clients are switching their cameras !

When one of the two client leaves, everything is fine

This problem is so annoying ... It appears yesterday and I stuck on fix it.
If anyone could help me, It would be great. I use PUN for 6 months now and I never had this kind of problem.

Thanks ! :smile:

Comments

  • Gumiho
    Options
    Ok after some hours, I finally fixed it ! :smiley:
  • jeanfabre
    Options
    Hi,

    just to confirm, you had to use PhotonView.isMine to check what to disable depending on who controls a particular PhotonView, right?

    Bye,

    Jean