I am working on to replicate something like this https://www.youtube.com/watch?v=-ZHHO5IT9CE, in the riding on a raft section. The expected output looks like in the "RV There Yet", "Raft" and "Lethal Company" game, where standing in moving objects/platforms/vehicle looks smooth both in server and clients. I am using Netcode btw.
The Initial Problem: The server sees the nonserver player drifting from the vehicle due to some transform mismatch between the server and the nonserver.
The solution presented in the comments of the video: the creator said that the server handles the physics on the host only, and clients position are client authoritative only when they are pressing movement keys.
Tried Solution:
In server, I tried to snap the player on the moving vehicle, but now it doesn't move visually in the server even if the client is moving around the vehicle(maybe due to the network transform being overwritten by the snapping logic). I then tried to ServerRpc the client's input so the server will know if the client is making any input. I snap it only when the client is not making any inputs, it works but the transition between the 2 is snappy. It teleports, it wrongly predicts, it feels like there's a delay between the visuals of the client whenever the transition happens. It's a strange mix of seeing it locally and then the prediction of network transform whenever the player moves and stops.
Play Deadvale: https://store.steampowered.com/app/3504850/Deadvale/
Play Rise of the Primals II: https://juggernaute.itch.io/rise-of-the-primals-ii-demo
Example uses simulated 100 ms latency.
00:00 Picking up a crate
00:30 Riding on a raft
01:04 Picking up a crate with another player
01:33 Balance scale
01:50 Launching a player