This plugin adds in a component and an animation node that replicates entire skeletal mesh ragdolls.
On the server side the skeletal mesh is simulated as usual and the bone transforms are captured and replicated (if the bones have moved) on tick. The client side interps each bone to the replicated bone transform inside the animation node.
The plugin has some network optimizations. If a bone hasn't changed its transform then it is not updated over the network.
Network transform updates are compressed. Translations are compressed using FVector_NetQuantize and rotations are packed to 1 or 2 bytes per axis. Bone scales are NOT replicated.
The network compression amount can be changed in your project settings, under Engine -> Anim Replicated Ragdoll Settings.
- Add the
Replicated Ragdollanim node to your skeletal mesh's animation BP and make sure your skeletal mesh is using that animation blueprint.
- The node should be at the end of your animation blueprint.
- Add the
ReplicatedRagdollComponentto your actor. Make sure it is directly attached to your skeletal mesh component. - Make sure that your actor that contains the skeletal mesh is replicated.
- Make your skeletal mesh simulate physics on server and it will capture and replicate the ragdoll to the client. The client should not simulate physics. The replicated ragdoll data should be applied on client as long as
ShouldApplyRagdollreturns true on the component and there is data to apply.