How to Replicat a physical object in MP game mode

Hi guys

is there are any video tutorial on how to How to Replicat a physical object in MP game as i already asked in UEanswerhub but no use “How to spawn physical object in MP and Replicat it to the client - Multiplayer & Networking - Unreal Engine Forums

i will be very grateful if anyone can help me here as there are many people asking the same question and there are no tutorial about it only that 6 episode that UE team published in youtube that cover very few thing in MP .

i found the only way that worked for some people by event tick update the location of the physical object in the client but not sure how .

this is my lvl blueprint that spawn the physical object :

so my question is how can i spawn the object in the server and give the location to the client without even the client didn’t spawn the same object ?

BTW replication the move in the server for that physical object didn’t work as every time a new physical object the location that move to is different of the server than the client .

Thanks …

You should only spawn actors if your the server, use switch has authority. The actors should be replicated and you can also tick replicate movement. You will also need to give new spawned characters a default controller. If your trying to replicate physics, I advise leaving that client side unless it is game play important.

Thanks a lot mavendigital i will try and hope it will work .

I fixed my issue by removing the scene component in my spawn object (physical object) and make the static mesh in the physical object default scene . i had no idea and why the default scene make such problem during replicating the movement of the physical object ? it gave me a headache and no once mentioned such things so hope my answer will fix problem for other people and thanks a lot guys for the support .

9b564c225148ebb42c9e17a16ad49f9dddc7b3a2.jpeg

It’s not the default scene component but it was the switch to static mesh actor. Static mesh actors have coded movement replication

sorry for my noob question as I’m new to UE by "switch " you mean switch has authority or something else related to the scene ?
And now i faced another problem with replication :frowning: , i have a blueprint that spawn a a child blueprint and no matter which blueprint the parent or the child i replicate the child blueprint don’t get location update in the client , the only way i were able to make it move and get the location update by event tick and getting the location from the server and store it as variable with "set actor transform " then set the location of the child blueprint in the client but this method make the object move with shutter no matter how much i increase the replication time rate . so any tips on how to replicate a child blueprint’s location smoothly ?

fd3f8430563c9770edb2e6cefb6189c2efc1b516.jpeg

Thanks

Goto Class Settings, click on where it says Parent Class and change it to StaticMeshActor

@ DEDRICK Thanks for the explanation , any tip about my last problem ? how to replicate the movement for a child blueprint as i tried to convert them both to a StaticMeshActor and hope may be it will solve the prob but still the child blueprint’s movement not replicating .

edit: i fixed it by replacing child actor by spawn actor instead , and now the movement can be replicated , but more than 20 actor the client get very shutter which i don’t know why as the bandwidth as peer my check is less than 10 kb .any tips here ?