0

This is my first networking game. I am trying to figure out how I position the player. My Player is a building, so it doesn't move, but it dictates the game. Like a Tower Defense. I always want the player to be at the bottom.

What I need is for isLocalPlayer to be at the bottom and the !isLocalPlayer at the top. I have a working networked game running. I have P1 at the bottom and P2 at the top. But this appears on both screens. Somehow I have to rotate the game object they are in for player 2?

Something like

if(Player2){
rotate game
}

Any ideas?

enter image description here

Tim Cooley
  • 749
  • 4
  • 19
  • 38

1 Answers1

0

On the unity3d documentation you can find in the networking namespace the NetworkStartPosition script

https://docs.unity3d.com/ScriptReference/Networking.NetworkStartPosition.html

you have to attach this script and customize it on the player prefab and the non-player prefab, if you are asking about network item spaw you can look her :

https://docs.unity3d.com/Manual/UNetSpawning.html

and if you are interested about other network management information you have a lot of information on the documentation, and some tutorials (I've tried them and they're actually working)

Edit :

if you just want each player to see something different you can use this tutorial :

https://unity3d.com/fr/learn/tutorials/topics/multiplayer-networking/identifying-local-player?playlist=29690

it explain how to "work" with the local player only, have you seen it?

yyg
  • 50
  • 1
  • 11
  • Thanks. I have the NetworkStartPosition system working. In the first image. Player 1 is on the bottom and Player 2 is at the top. This appears on both screens. What I need is for Player 2 to be on the bottom and Player 1 to be on top as the view for Player 2. It is like the whole thing needs to rotate. – Tim Cooley Feb 20 '17 at 16:49