Been fiddling with new water stuff recently but didn’t really found anything hinting that this system intends to support replication. Does it? Will it in future? If not then at least the wave generation should be synced and we could rep the simulated actor location ‘manually’ I guess?
ps. why there’s still no sub forum for multiplayer related stuff?
You can’t really expect to sync physics over the network with 100% accuracy (probably true for any movement).
That said, the system is based on a pre-built function.
As long as you sync game time the two clients will solve the math the same way. It should also already be frame independent.
As far as water interaction, splashes etc. That’s done at a local level with vector fields and particles in fortnite. You should aim to do it the same way.
Modify the material and pipe in the correct time variable instead of using the time node.
Change the CPP to use the same time to calculate and pluck wave height.
Then you have very little chance for things to go completely out of sync.
Let me also add, that Lag or time difference between clients won’t matter here.
So long as the wave material and the wave physics use the same unit of measure - then objects affected by buoyancy and the wave will always look to be in sync for everyone.
They can happen later than they do on server because of lag, but they will still be in sync.
So if the boat is a network replicating pawn, you need to account for that… set it’s client Z based on the reading of the physics, not on the network data.
Thank you! I’ll give that a go tomorrow. In the mean time I have also found the cvar r.Water.OverrideWavesTime I can adjust. This manually sets the time of the wave - it however only accepts integers and not floats.