Smoothing that?

My game uses authoritative servers. Everything’s great, I managed to make a pretty reliable prediction system and the players move pretty smooth. Now though the player you control has prediction and works smooth, the other players you can see from your machine while playing aren’t moving that smooth. Their movement is pretty choppy. I’ve set the sendrate to 50 and instead of directly asigning the position value from OnSerializeNetworkView, I’m using the lerp function:
transform.position = Vector3.Lerp(transform.position, newPos, 0.5);

However I still need to smoothen the movement of the other players. I can’t use prediction for this, because the clients just receive the other players’ positions. Can someone offer some ideas. And also what would be a good Sendrate? As I said, mine is currently set to 50.

OK, after long time rewriting codes, I finally managed to get the clients to move smoothly with lerping. Now I only want to know how low should I keep the send rate. As I said, mine is 50, but I’m not sure if this is okay.

Have you checked out “NetworkInterpolatedTransform” or “NetworkRigidbody”? They’re both scripts in this package. I use them both all the time, and couldn’t live without them. You can dissect them to see exactly how they work though (or just use them). They keep a buffer of the past thirty-some known positions and use prediction.

No, I didn’t know about those scripts. Woah, my life would have been easier if I knew about them earlier. I’ll check them out in details and try to use them with my rigidbodies :slight_smile: Thanks for sharing! :slight_smile: