Hi, I am making a multiplayer minigolf game and I have been working on movement. Everything replicates correctly, however I have an issue where all connected clients (not host) see all of the other players balls slowly rolling all of the time, and then when one of those players hits their ball, it teleports back to its actual position. I have a system where the ball meshes are told to sleep on both the client and server when they are going slow enough so I have no idea why this is happening. Any help please?
As you can see in the video, if I run the game with a host and 2 connected clients - the clients can see each other moving 24/7 but the server has the balls all stop correctly. I am sure I have replication setup right as the balls all move correctly when hit, its just this slight movement issue that occurs when their mesh has been put to sleep.
1 - Yes they replicate movement
2 - They are pawns
3 - Movement is physics based, I get how far the bar on the right is full and add force/impulse to the ball based on the way the camera is looking and how full the bar is.
I’ve run into this before and seemed to be caused by collision with moving objects that don’t replicate the same on client/server. Usually with other pawns collision box.
For instance player a walks into a box and playerb is not getting updated as fast, both do there version of the calculation until something happens on a client were it updates the replicated movment and the client sees its actually somewhere else.
It might be getting out of sync from a physics object hitting another. A solution might be not to use physics when a ball hits another but instead use a draw sphere for overlap and use a similar add velocity etc based on the linear velocity and hit result normal?