Networking Camera

Hey there!
I’ve finally created a prototype of a MP Game - creating Server, joining and moving is no problem.
But its actually not possible for me, to give every Player his own Camera. Just the Host gets a Camera, every else Player is only able to see the view through MainCam.

Script in NetworkSpawn

var Clone: Transform;
  Clone = Network.Instantiate(playerPrefab, transform.position, transform.rotation,0);
  Camera.main.SendMessage("SetTarget", Clone.transform);

and Camera Script:

var Target : Transform;

var distanceFromPlayer: int = 20;



function LateUpdate () {

 if (Target)

 {

  transform.position.x = Target.position.x;

  transform.position.z = Target.position.z - distanceFromPlayer;

  transform.position.y = Target.position.y + distanceFromPlayer*1.5;

 }

}



function SetTarget (t : Transform)

{

	Target = t;

}

Any idea?
Greets

How about adding this one thing to your camera script? Just after it gets network instantiated.

if(!networkView.isMine)
{
    camera.enabled = false;
}

Otherwise, make sure that the ‘Main Camera’ gets disabled on clients, or renders behind the other cameras (which isn’t a fantastic way of blocking it, but will still work).