How to control the movement of client character from server?

Hi mohaib21

Any position changes will need to be sent to the server. As a rule of thumb, it is better to apply the movement on the server and have it replicate naturally down to clients.

Sometimes this isn’t possible such as multiplayer VR.

For multiplayer VR, the HMD and controller tracking is purely client-only, so you have to manually push the updated transforms to the server and get the server to broadcast the new values to all other connected clients. However, this is extremely expensive and often you need to add interpolation to make the movement smoother. Basically, the owning client will send an update every few frames (as every frame would be too much for the server to handle depending on how many clients are connected). In between these frames, logic on the client will smoothly translate the movement of the object in the world.

Hope this makes sense.

Alex