PUN photon transfrom view jitter

I am using PUN in a pool game. Everything works fine except when I change the ownership of photonViews, the views move out of place for half a second before going back to the right place. Very annoying and noticeable. Does anyone have any suggestion on how to solve this?


My setup:

  • Each ball has a PhotonTransformView component attached
  • My game controller has a photonView, doesn't move and is on the parent node of all the balls.
  • When all the balls come to a stop the second player calls photonView.RequestOwnership on the photonView of the game controller node.

At this point some of the balls jump a little bit in the direction they were moving before their stop and then come back to their correct place. This doesn't happen for the balls that have not moved at all since the beginning of the turn.

Answers

  • This is likely a problem of how the lerping in the PhotonTransformView is applied or there is a delta for the position between players.

    You likely have to copy the PhotonTransformView into your own variant and suppress the reaction (in doubt, you may have to set a flag that signals the owner changed).