Moving Parts On The Server Is Choppy On Client?

Hello, so I have been experimenting with custom collisions. I have gotten a decent simulation going, but I cant figure out how to fix replication lag

The simulation works SMOOTHLY on the server, but choppy on the client. This is because, when i solve collisions, I have to manually set the position on the server.
And that causes choppiness.

Collisions are calculated on the server, in a Heartbeat connection.



As you can see, there are 2 separate client simulations:

  • The first one, the spheres don’t sink into the ground, but they are choppy. This is because setting the position is what keeps the spheres from sinking

  • In the second one, the spheres simulate smoothly, but they start sticking to the walls / ground, and eventually sink under. This is because only the velocity is affected, the position doesn’t get set by the server script.


So, is there a way to set the position of a part on the server without causing that choppy lag?

Or, is there a way to sync physics on all clients, and handle collisions on the clients. Without the balls de-syncing??

I am open for trying anything!
Thanks!

Set the network ownership of the balls, this usually happens with unanchored parts

1 Like

In the videos above, the network ownership is already set to the server.

In the third video, they move smoothly. It’s just when the position is set manually, the parts become laggy for the client.

why heartbeat? if you doubled it and used a super wait it would maybe half the lag