How To replicate the runtimemesh on server
We created a runtimemesh actor with runtimemeshcomponentstatic, and createsectionfromcomponent. But we can't spawn runtimemesh actor on client side unless we do the createsectionfromcomponent at BeginPlay stage. we want to konw how to createsectionfromcomponent only once on server then replicate the actor to the client. Can you kindly adivse. Thank you very much!
We created a runtimemesh actor with runtimemeshcomponentstatic, and createsectionfromcomponent. But we can't spawn runtimemesh actor on client side unless we do the createsectionfromcomponent at BeginPlay stage. we want to konw how to createsectionfromcomponent only once on server then replicate the actor to the client. Can you kindly adivse. Thank you very much!
I'm not officially affiliated with RMC, but I am using it exclusively in multiplayer, currently RMC does not support direct replication, I.E you cannot create geometry on the server and it automatically get pushed out to clients, as it stands, you have to run the generation of your mesh both server side and client side separately.
What you can do is have your server side generate the data that can be used to construct the mesh from, then replicate that via a ReplicatedUsing/OnRep variable and then reconstruct the mesh on the client separately.
Duh? Migrate the data yourself? Why would you expect a plugin to do everything for you? I would not suggest this, that is not what the plugin is about.
I don't replicate RMC via server to client, I actually generate a custom data structure that both the server and the client reads. The Client already knows what to draw based on this data. Doing replication with streaming can hurt bandwidth overall and limits how much you can do. So I would encourage you to figure out how to structure your data set where both your server and client reads.
What I am doing is creating a C# cluster network server where server replication is pure binary and not UE5 RPC. Server doesn't care how RMC is rendered, it just cares about what is what in regards for collisions because the server is the driver for actual gameplay mechanics. The client just renders what needs to render.
To give you a simple concept of what I am doing. I have broken up my world map into 64x64 chunks of data, each cell in that chunk is 50UU the server tracks everything by 1UU movement, the client does predictive movement and controls that where the server verifies where the player is in the world. Also I do not use the typical Actor Location, the player's pawn stays on the screen at 0,0,0 origin. All of this works right now.
https://www.youtube.com/watch?v=e9C1rrS-q5I as an example of what I am doing so far, the land surface below the pawn is RMC. The Pawn is not a Character because movement is controlled differently than the built-in movement component