I’m trying to AttachTo() multiple static mesh actors together at runtime and have that replicate in multiplayer. The engine will replicate attachments if an actor has SetSimulatePhysics() set to false.
However if you then set the parent of an attachment to have SetSimulatePhysics(true), attachments for clients will break, and children lose their body instance so they won’t be able to simulate physics.
Am I doing something wrong? Or any better suggestions at replicating welds at runtime?
I’ve traced the problem to AttachmentReplication and ReplicatedMovement, found in Actor.cpp/Actor.h and ActorReplication.cpp. Specifically OnRep_ReplicatedMovement() and OnRep_AttachmentReplication(). The server is telling the client that the child objects are simulating, and in the OnRep functions the client detaches from any attachments, because physics simulating objects can’t have any.