Players Share Position
Options
jlromero
✭
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!
0
Comments
-
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.0 -
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?0
-
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).0