Local and global transform synchronization

Options
Hello,

I have a problem where I have to synchronize a global position of one player in one scene with a local position of an object in the scene the other player sees (2 different scenes). So, the player I'm synchronizing is in the root of hierarchy in his own local scene, but should be a child of another object in the remote scene. By using the default PhotonTransformView, it seems to synchronize the global position of the player. For example, if the first player is in the root of hierarchy of his own scene with position 1,1,1, I have to render that player in the remote scene as a child of another object with 0,1,0 coordinates, the resulting position of the player in remote scene should be 1,2,1, but it still gets rendered on 1,1,1.

Thank you,
Chokoladni

Comments

  • Chokoladni
    Options
    Alright, I figured it out in the meantime. I created my own TransformView script, which is basically a copy of the PhotonTransformView, but instead of using global position (transform.position), it uses transform.localPosition.