Hi. I would like to ask more knowledgeable people about transform updates for objects that are simulated. I understand that this is not an easy task. So far I used simple position and rotation sync with linear interpolation and it worked alright. But now when I got to simulated objects like rigid bodies, it wont work. For obvious reasons. Now, I wanted to ask what techniques are normally used for simulated objects? Server sends velocity update regularly, and then clients must simulate that object too and apply the velocity, once in a while server sends position and rotation update to correct the object. Is that right ? In my case server only simulation will not work. Objects I am talking about are tree branches that fall from the tree and bounce around, players are able to move them around etc. I use UE4 but my question is more about concept and understanding of the method, rather than code examples.
Synchronising physics is a difficult task and really depends on what you want to do with it. Have you seen this talk by Glenn Fiedler? It’s a very good general guide to the problem.
UE4 uses extrapolation for physics objects by default, and the Unreal GDK emulates this replication behaviour. In my experience the default implementation in Unreal works pretty well for small numbers of objects that players need to be able to push around.
If you want help specific to your current problems then it would be useful to get more of an idea of what you’re trying to achieve, how many physics objects you are trying to network, and how complex you want the interactions with them to be.
Thank. I will definitely check that out. I am not using spatial gdk for ue. I have my own implementation from scratch for ue and cryengine. Could you point me on the specific file in your gdk, so I could check it out how it’s emulated? Basically I have procedurally breakable trees and players are able to chop off branches or slice tree into pieces. There will be quite a lot of pieces potentially and they will be interactive(pickable etc.). When player chops off one of the branches, I want it to fall down by simulating it. Later players can push it around too.
The GDK is pretty complex so I’m afraid I can’t point out one file where this happens. But since it emulates native unreal, can’t you just look at what happens when physics objects are replicated in native unreal and copy that for your own implementation?