Skip to content

Conversation

@upisfree
Copy link

@upisfree upisfree commented May 1, 2025

Hello! I tried to find a way to contact you but failed, so I'll leave my contact info here if you want to answer my question :)

I have question regarding your comment in Rapier repository: dimforge/rapier#324 (comment)

You said

I recently had success implementing client-side prediction and lag compensation with Rapier running on a server and client
that means you have successfully implemented client-server sync. I assume between that client is browser and server is node.js.

I am trying to implement this system too. So, my question is: how did you implement world update with constant rate in browser & node.js? As I understand, you must update client world and server world with the same constant rate if you want to minimize desyncs.
My dynamic bodies are always in desync, especially on collisions between kinematic character controller.
My problem with different world update rate. I tried something like setInterval(world.step()), but browser and node.js can't have same constant rate of updates and client tend to do more steps and all dynamic bodies are faster than on the server and results are in desync.

I tried to use this library for constant rate world updates, but browser tend to update with random rate, not constant.

Thank you very much for your time. If you want, you can answer me here or at email, discord or telegram.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant