Question about changing networked player positions locally

I have a 3D game I'm working on where there are 3 players in the room in a "V" configuration. The camera is set such that you see a player in the center/back and 2 players forward, one to the right, one to the left like this:

2 3

The camera is behind player 1 and shows all 3 players at the same time. The issue is that I want each client to have THEIR player character in the "1" position and the other 2 players in the 2 and 3 slots. I instantiate them all in the correct positions and that all works properly. The players don't move so I'm not sync'ing their positions. What I need to do is to get the instanced player object for the "other" players and adjust their positions.

How can I get the other players instanced gameobjects so I can manipulate their transform.position?

Thanks for the help!


  • Hi Crazyguy,

    I guess the simpler variant is to adjust the camera instead of up to three player objects. If there is a script attached to the prefab, you can add something like the following to its Awake or Start function.
    if (GetComponent<PhotonView>().isMine)
        Camera.main.transform.position = /*position behind the current game object*/;