Jerky, Laggy

Hi.

I’ve made a small driving game, but the problem is when I connect them on LAN, the movement is very jerky looking.

I’m connecting the clients to a server and using Network View objects on all the cars using Reliable Data Compressed.

Send rate I’ve ranged from 250 to 1000.

Is there any other way to make the data faster or a way to make the movment less jerky?

do you have movement prediction? is your server authoritative?

No and no.

I’m not sure how to do movment prediciton.

For this, should I be using sending the transform information or rigid body? since it’s using physics though add force and torque to move the vehicle.

Rigid bodys done no good.

Any one have any ideas on making it less Jerky looking?

All it does right now is

Player connects to server

Car spawns when new player enters, the car have network view object attached.

That’s all I’m doing currently, is there a smoother way?

lerping position/velocity is pretty much the only way to make it not jerky

Network prediction is little tricky, but linear interpolation is a little easier. The network sample on the Unity page has lerping for both authoritative/non-authoritative. The concept is pretty much the same. Go check out the car scene in the network demo and look at how data is synchronized in the player prefab. You will have to manually synchronize data with OnSerializeNetworkView()… look for that method.

What you are likely seeing is moving an object from one position to the next as the view updates. While objects really do move as a series of small teleports, the goal is to speed up the teleports so each one is smaller and less detectable.