Players Share Position

Options
I admit I am new to not just Photon but networking in general. I want every two players to share the same transform.position. Best described as a pilot and his gunner. I have tried numerous scripts to no avail. Any help would be appreciated!

Comments

  • vadim
    Options
    First you should decide what is position source. Pilot, or maybe airplane?
    Then you just update positions relatively to source in Update() call on pilot and gunner clients and sync them across network as usual.
  • jlromero
    Options
    Thanks for your answer. I know how to sync the players position to the network. However, what gets me is how to constrain Player2's position to that of Player1's?
  • Tobias
    Options
    One of the two must have control over both. Actually, one would control the plane, while both crew members are basically attached to that. So you don't sync the gunner's position, as it's defined by the incoming positions of the plane.
    If you want to, sync the movement of the gun. The gunner affects only the rotations and fire-state but it does not send where the gun is (again, controlled by the plane).