From the course: Unity 5: Network Gaming

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Respawning

Respawning - Unity Tutorial

From the course: Unity 5: Network Gaming

Start my 1-month free trial

Respawning

- [Instructor] Our game is almost done but there's one huge problem, the player's spawn point is the zero coordinate in the scene. So basically when multiple players spawn in at roughly the same time, they'll be on top of each other which might make for an amusing battle scenario but seems a bit unpolished even for a tutorial. Let's address this by making several spawn points and having the server pick one from a list. I'm going to make an empty-game object and label it Spawn Point One. And I'll go ahead and set the label to show up, I'll use the green indicator to make them easy to see even when they're not selected. Next I need to add the Network Start Position component, and that's pretty much it. I have a good spawn point now and now I can duplicate this, and move it around the scene. Before I do that though, I'm going to turn on the boundaries so that I can see them. It wouldn't do to create a spawn point outside of our boundaries. So I'm going to turn the mesh renderer back on…

Contents