KinematicRagdoll does not create any Collission Shapes

Hey Guys,
I tried to implement a Ragdoll into my game, however I end up with “nothing”.
The model is neither falling to the floor (setRagdollmode has been called), nor do I see any shapes in DebugView.

I know it’s very vague but essentially I am not doing much different than the TestBoneRagdoll:

KinematicRagdollControl ctrl = new KinematicRagdollControl(0.5f);
// The KinematicRagdollControl has to be added directly to the SkeletonControl's Node, and since the importer not always has it there, attach it
ModelContainer.getSkeletonRecursive(s).getSpatial().addControl(ctrl); // Auto-Add to the Physics Space

I also tried different things like adding the Spatial to the Physics Space and I know that the Control got added (before I did this fancy getSkeletonRecursive stuff, I had an Exception since the Ctrl couldn’t find the SkeletonControl), and also I would have a NullpointerException if getSpatial() was null.

Any Ideas on how to debug this? Maybe my Model is crap?

1 Like

Well its not magic, theres some stuff that has to fit. The model needs a proper bone structure with proper names / the control needs to have the names of the bones in its dictionary etc etc

Theres not much documentation on it and I guess most people here would have to look at the examples and source of the ragdoll themselves to tell you specifically what you have to do but luckily you have access to both as well :slight_smile:

1 Like