I am working on a game where players will be walking around inside of a large battleship. For the most part this works fine, however sometimes something glitches causing the client and server physics to seemingly desync. This recording is taken from the SERVER perspective. The part has ownership on the client (red), after 6 seconds I set the part’s ownership to the server. You can see that when I do that, the part stops gliding. The battleship is not moving, yet the part is gliding as if it is.
It’s as if the client’s floor is holding some kind of invisible velocity property causing this to occur. The velocities of the ship on the client are all 0 and the ship isn’t moving on the server. The only form of replication step I have managed is if the battleship gets created in a location on top of the client’s local parts (bullet shells, etc). That seems to kick off the physics desync for some reason.
This next clip (taken from the CLIENT perspective) is the result of when the battleship spawns on top of bullet casings (local parts) from the previous round. You can see when I anchor the battleship on the client, the jittering stops, and resumes when I unanchor it. Again, 0 linear and angular velocity for all parts of the battleship both client and server.
So what can be done to fix this? Why do the collisions act as if the battleship floor is moving/shaking when according to both the client and server it isn’t? Is this something I can even fix or is this a roblox bug?
Some more notes:
- Printing out the AssemblyLinearVelocity and AssemblyAngularVelocity for all parts on both the client and server is 0,0,0. The battleship is definitely not moving.
- The game does NOT use StreamingEnabled
- The ship is controlled with BodyVelocity, BodyGyro, and BodyAngularVelocity on the SERVER
- Anchoring the battleship on the client stops the jitter. Unanchoring it resumes it
- Moving the battleship on the server does no ‘resync’ the physics. Parts still drift and jitter around.