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.