- Home /
Question by
newdusk00 · Mar 10, 2014 at 03:59 AM ·
cameranetworking
How do I spawn a Client camera parented to a host Controller
I am currently working on a first person project where there will be only 1 main player and 3 other players will just be observing through 3 different cameras.
Host: CameraMain + Controller Client1: CameraLeft Client2: CameraRight Client3: Camera back
Can anybody help me with this?
Here is my spawn script:
ServerPlayerManager.js
#pragma strict
function spawnPlayer(player : NetworkPlayer) {
var ply : PlayerInfo = GameObject.FindObjectOfType(PlayerInfo);
var go : GameObject = Network.Instantiate(ply.playerPrefab, Vector3.up*3, Quaternion.identity, 0);
}
Comment
If I understand correctly... You want to have a camera automatically attached to each Controller? How are you spawning the Controllers? Could you show some code for that?
Hello suribe, thank you for the response I used this tutorial for help.
I edited my post with my spawning code inserted.