Hey guys, I need your help. How can I replicate a ragdoll in UE5.5?
Hello there @Fellor1s!
Of course, there are multiple guides on how to setup ragdolls in UE5. From my personal testing, I would suggest the following two. The first one is simple and to the point, then the second one is more of a deep dive, including methods for making your character stand up and recover from the ragdoll state. Please give them a look:
Thanks, but my problem is that I don’t know how to replicate physics for a skeletal mesh. It varies for different clients, and I don’t know how to solve this.
simplest way is to set physics on server only and replicate the movement, the mesh will detach from the capsule so you may have to set the capsule location on tick. if you want to replicate the actual bones you’d have to do it manually but really thats just cosmetic
I tried replicating the movements, but it didn’t help. Could you tell me how to manually replicate the bones?
i havent done this myself but i expect.
OnServer → GetMesh → GetBoneTransforms → AddToReplicatedArray
OnClient - > GetArray → GetMesh → SetBoneTransforms
you wont need all bones i think just the major ones. you could probably update it in the AnimGraph rather than tick behind an IsRagdoll check.
Unfortunately, I don’t know why, but I can’t change the transform of the skeletal mesh bones.
You can’t modify bone transforms on a SkeletalMeshComponent while it’s simulating physics, the physics solver overwrites them every frame. If you want true bone replication, run ragdoll physics on the server only, replicate the bone transforms (or just key bones), and apply them on clients via AnimBP nodes like Modify Bone or Control Rig with physics disabled. Direct SetBoneTransform only works with PoseableMeshComponent, which is why your changes aren’t applying.