Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Sync Problems

$
0
0
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".

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>