Implement player network spawning and position synchronization
This commit is contained in:
1 parent
6e037b4d06
commit
b05cab8288
30 files changed
+689
-26
No files matched your search
@@ -19,8 +19,9 @@ public class PlayerSpawner : MonoBehaviour
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
public void Spawn(GameObject player)
|
||||
public void Spawn(PlayerComponent player)
|
||||
{
|
||||
player.GetComponent<HVRTeleporter>().Teleport(spawns.First().position);
|
||||
var spawn = spawns.First();
|
||||
player.Teleport(spawn.position, spawn.eulerAngles);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user