So I’m trying to make it where only you can see your arms and stuff but not your character and other players can see your character but not your arms and stuff. This is my code so far (not all of it):
using UnityEngine;
using System.Collections;
public class FirstPersonNetwork : Photon.MonoBehaviour {
MouseLook cameraScript;
MouseLook cameraScript2;
CharacterMotor controllerScript;
Shot shotScript;
public GameObject camera;
public GameObject fpsView;
public GameObject tpsView;
void Awake () {
cameraScript = GetComponent<MouseLook>();
cameraScript2 = camera.GetComponent<MouseLook>();
controllerScript = GetComponent<CharacterMotor>();
shotScript = GetComponent<Shot>();
if (photonView.isMine == true)
{
this.camera.camera.enabled=true;
cameraScript.enabled = true;
cameraScript2.enabled = true;
controllerScript.canControl = true;
shotScript.enabled=true;
fpsView.active = true;
tpsView.renderer.enabled = false;
}
else
{
this.camera.camera.enabled=false;
cameraScript.enabled = false;
cameraScript2.enabled = false;
controllerScript.canControl = false;
shotScript.enabled=false;
fpsView.active = false;
tpsView.renderer.active = true;
}
gameObject.name = gameObject.name + photonView.viewID.ID;
}
However, when I test it, I can still see my character.
This is my setup:
FPS Controller (script attached to this)
----FPS Camera
----3rd Person Model
camera = FPS Camera
fpsView = FPS Camera
tpsView = Character Model