Ragdoll flies out of parent when exploding, how to make it follow along?

I’m having ragdolls that fly when a grenade explodes, but they are flying out of it’s parent, and I’m not sure how to avoid that, since I want them to get up again after flying away transitioning back with a get-up-animation.

I might have a weird setup, but my structure looks like this:

Unit (Scripts, NavMeshAgent, Animator for FSM)

  • ModelContainer (Animator)
    – Bip001 (Container for all bones)
    — Bip001_Pelvis (Rigidbody, Collider, Configurable Joint, Fixed joint → connected to RagdollPuller)
    ---- All other body parts as normal children (Rigidbody, Collider, Configurable Joint)
    – Mesh (Skinned mesh renderer)
  • RagdollPuller (Rigidbody, connected to Bip001_Pelvis with a Fixed joint)
  • HealthBar (Graphic)

When an explosion happens, it’s applied to RagdollPuller, and it nicely makes the ragdoll fly, however, since it’s a child of Unit, the Unit stays in place, and when I disable the ragdoll, they snap back into it’s original position.

I first tried to have the Rigidbody and Fixed joint on the main gameobject (Unit), but that made them spin around like crazy.

How would you setup a situation like this, to make it work in a better way?

You can see what’s happening since their health bars don’t follow along:

PS: I have bought the PuppetMaster asset, but since I will be animating around 50 characters in a scene, I figured it might use too much resources for this. If you’ve used Puppetmaster on a mobile application with good performance, please let me know.

maybe some ideas for the bars

  • healthbars under head in hierarchy, and then use script or shader to keep them facing camera (and above head)
  • external script to move healthbars on head positions in the view (so they dont need to be child of unit either)

Thanks, there was a billboard script for it but it’s disabled :slight_smile:

I think the solution is to have the ragdoll as the root object and put the scripts a level down, and the ragdoll-mover-object as a separate object. Not sure but will test again… :slight_smile: