Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Respawn as a new object

$
0
0
Hello there!
I'm working on a multiplayer shooter and the plan is that the dead bodies of killed players stay on the scene and the player respawns as the new player object. I'm new to networking and my problem is that the new object is not a local player.

Code (CSharp):
  1. public void respawn()
  2.     {
  3.         GetComponent<NetworkIdentity>().localPlayerAuthority = false;
  4.         GameObject spawnedPlayer =(GameObject) Instantiate(playerObject,...
Respawn as a new object

Viewing all articles
Browse latest Browse all 16796

Trending Articles