Hi, im trying to Sync 2 player´s position and all the time I´m having "lag".
This is the code I used:
void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.isWriting)
stream.SendNext(rb2d.position);
else
rb2d.position = (Vector3)stream.ReceiveNext();
Debug.Log("Info: " + rb2d.position);
}
But I have this error and I don´t now if this error may be the problem:
https://gyazo.com/33a9dd929ebce5bb1a3ed378b4ee2d67
I also used the interpolation metod but I had the same "lag".
This is the code I used:
void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.isWriting)
stream.SendNext(rb2d.position);
else
rb2d.position = (Vector3)stream.ReceiveNext();
Debug.Log("Info: " + rb2d.position);
}
But I have this error and I don´t now if this error may be the problem:
https://gyazo.com/33a9dd929ebce5bb1a3ed378b4ee2d67
I also used the interpolation metod but I had the same "lag".