- Home /
Generate character in different position in photon network while joining room
hello
How to spawn connected player after joining room in different position using photon.instantiate ? the connected other player should not get same position of master client Thanks in advance.
Answer by 334499p · Dec 25, 2015 at 01:04 AM
You can create an empty gameobject in your scene and use its position to spawn a player:
Public Transform spawn1;
void Start(){
Spawn();
}
void Spawn(){
PhotonNetwork.Instantiate("player", spawn1.position, spawn1.rotation, 0, null);
}
Just link your gameobject to the script's public "spawn1" transform. @ajaybhojani
yes. But generated my player should be remain in centre and other connected player should acquire random position in game play. this should be happen for each individual player which connects in room. Thanks in advance.
Your answer
Follow this Question
Related Questions
Unity multiplayer solutions: Photon, Unity Networking - what else and in what way is good? 0 Answers
Photon Unity: Build Starts on wrong scene. 0 Answers
Photon Combat script does not work 0 Answers
Use MasterClient as Authoritative server (Latency Issue) 2 Answers
Photon network won't join random room with a custom property 0 Answers