Hello..
Im instantiating my character.. (Its working really fine).
But how to assign the camera to the character now? The camera and the player are in the same prefab. I tried to use Parenting, but now the camera is always looking at the newest created player.
Im using this on the camera:
var target : Transform;
target = GetComponent(Transform).parent;
Is there a better way for instantiating? I just found "Find by tag" but isnt it the problem that it will search one of the many players and not the newest?
Thank you very much. I would be glad for a little easy example.
My second problem: Im using
function Awake(){
if(!networkView.isMine){
enabled=false;
}
}
//Other script
function Awake(){
Spawnplayer();
}
function Spawnplayer(){
var myNewTrans : Transform = Network.Instantiate(playerPrefab, transform.position, transform.rotation, 0);
}
I get every time a player connect a new Object.. the problem is that all other players (Exept the newest one are loosing networkView.Ismine ... why?