Child mesh components failing to replicate physics

Hi. I’ve got a problem that I’ve been working on diagnosing. It occurred because I was trying to set up a skeletal mesh to be root component for a child actor when parent normally used a static mesh - so I left static mesh empty, attached skeletal mesh to it, and treated skeletal mesh as new root for all intents and purposes. This included physics simulation, and worked just fine with a few workarounds on local. However, over network, I ran into a big problem which I have since reproduced in a simplified test project.

When there’s a component like a scene component or static mesh as root, and a mesh component attached as a child of that, if you try to enable physics on child component it will have serious problems over network. If component is not set to replicate, nothing will happen at all - clients will see object sitting still while on server it rolls around. If it IS set to replicate, what happens is object doubles it’s X, Y and Z values for it’s location, for whatever reason, only on client. So if object is at 100, 100, 100, once you enable physics on child component, it will suddenly be at 200, 200, 200 (even though it’s still 100, 100, 100 on server).

I’ve produced a test project which reproduces this issue very simply, with a few boolean values on test actor to adjust what type of mesh it is and whether or not it sets to replicate. Here’s link, it would be really helpful if someone could check this out and see if there’s a solution or at least post a bug report. I’ve tried manually adjusting client’s location after it doubles to try to get it back to what it should be, but it instantly moves back and away.

Test Project Download

Test project instructions: I added a TestActor blueprint in project, which has some simple ConstructionScript stuff to create either a skeletal or a static mesh component based off TestStatic? boolean value, and also sets component to replicate or not based off TestReplicate? boolean, both of which are exposed to edit to show how it interacts on both sides. As TP Character, you can press T to simulate physics on all of TestActors, which also starts printing a location for child mesh in question to analyze difference between server and client.

Hey DylanBrady,

Thanks for report! I’m seeing same thing in your project and a new project, so I’ve entered a bug report for this behavior (UE-26120). It appears that this only occurs when you attempt to Set Is Replicated on a mesh added to an actor that is already set to replicate, and only after simulating physics. Let me know if you see any other circumstances in which this occurs, otherwise you can simply skip Set Is Replicated for that component and it should work as expected. Thanks again!

Thanks for reporting it! Unfortunately, skipping replication is not a solution as far as I’ve tried. If I skip Set Is Replicated it doesn’t have that issue, but it also just doesn’t replicate physics movement of component at all. So between two options I can’t find one that will actually make it work to have a physics enabled child component over network

Ah, I apologize, I missed a step in my clean project’s reproduction. You’re correct, it seems disabling Set Is Replicated doesn’t help issue. If you only need it to fall once, you could work around it by doing a RoS RPC followed by a Multicast RPC, but if you need to continue using physics on components (or need them to land in precisely same location, which can be problematic with non-flat-bottomed collision), that solution won’t help either. I’ve edited bug report to clarify.

Alright thanks for updating bug report! problem as of right now isn’t hugely important for me since it works in local and I have other things to work on, so I’ll probably just leave it and hope it gets fixed in next version.
So thanks again for your help:)