Synching Player Transform With Both Players on a Moving Object

Howdy,

I have a scene setup where two players instantiate inside of a car and are set as children of the car. The car then begins to animate and the players move with it. The problem I'm having is when both players have joined, the car motion does not match on both player's screen, and when looking at the other player their movement is very jumpy and laggy. I have a PhotonView on the car and both players with their transforms. Any suggestions for how to get this synched up properly? Thanks so much.

Comments

  • Hi @brotchvorger,

    if both characters are children of the car object (on both clients, this is important) it should be enough to just synchronize the transform component of the car. Means that this needs a PhotonView component observing a PhotonTransformView component or another component with a custom OnPhotonSerializeView solution.

    the car motion does not match on both player's screen


    This might be caused due to lag or there is something wrong with the setup or synchronization.

    when looking at the other player their movement is very jumpy and laggy.


    If you are using the PhotonTransformView component, it has some different options for synchronization which you can test and see if one of those works better in your case.
  • Thanks so much, Christian. Messed around with all the settings and ended up getting something working, although I'm now moving the street 'around' the players as opposed to having the players move. It's hacky but it should work for now. No matter what settings I tried I couldn't get the player's to sync without jerkiness. Estimated speed for interpolate and extrapolate is what worked for me.
Sign In or Register to comment.