If I play with a dedicated server running in the editor, movement becomes out of sync and weird.
Here’s my setup:
Each tick, if “wants to jump” bool is true, it checks if the player is touching the floor, if they are it adds an upwards velocity and sets their movement mode to falling
Assume the ‘wants to jump’ is always kept true. If there isn’t a dedicated server running, the player keeps jumping each time they land as expected. If there IS a server running, there’s a time delay between them landing and jumping (like it’s waiting for the server to tell them they’ve got a new velocity).
I’ve tried various combinations of replication / run on server etc. and nothing seems to work. I want the client to predict their velocity change (instantly) and the server to do the same calculation (when it sees the player is on the ground) and end up with the same result. But it seems things get out of sync and there’s a delay.