Photon - Enable MouseLook Script from First Person Controller?

Currently working on a network solution with photon. Everything works fine, i enable all important scripts and the camera to make sure everything is enabled for each and every player. Works fine, however, i can’t access the MouseLook script, since its a part of the First Person Controller Script from Unity Standard Assets. It get’s activated automatically by just typing in:

player.GetComponent<UnityStandardAssets.Characters.FirstPerson.FirstPersonController> ().enabled = true;

Which is completely fine. However, the problem is that the MouseRotation for each player gets still duplicated.

Activating the camera didn’t help:

player.GetComponentInChildren<Camera> ().enabled = true;

Any ideas how to enable Mouse Input for each and every player?

Thanks in advance!

Hi,

you have to add a PhotonView.isMine condition to the FirstPersonController to only process the input made by the local player. So please try adding the following code snippets to the beginning of each Update function and each variant of this function (FixedUpdate, LateUpdate…) when there is some input processed to avoid this scenario:

if (!photonView.isMine)
{
    return;
}