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
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Project overview3m 15s
-
(Locked)
Set up the Network Manager2m 11s
-
(Locked)
Network identity3m 1s
-
(Locked)
Testing the game3m 46s
-
(Locked)
Network transform6m 58s
-
(Locked)
The local player6m 26s
-
(Locked)
Instantiate projectiles6m 58s
-
(Locked)
Firing projectiles6m 5s
-
(Locked)
Multplayer projectiles5m 2s
-
(Locked)
Adding a health indicator, part 12m 53s
-
(Locked)
Adding a health indicator, part 23m 44s
-
(Locked)
Adding a health indicator, part 34m 46s
-
(Locked)
Multiplayer health5m 54s
-
(Locked)
Fragging the enemy5m
-
(Locked)
Respawning6m 14s
-
(Locked)
-