Creating Ragdolls Help

I’m creating a online multiplayer game and I think it would be really funny if enemy players ragdoll on death is there any easy way I can do this?

Hi @WilliamBoersma31,

Here is an example project: PlayCanvas 3D HTML5 Game Engine

Take note that’s an experiment, not an official example.

Hey @Leonidas I tried to import the code into my scene because I used mixamo as well so it should have the same joints but it gave me an error when I tried it
the error was
[ragdoll.js?id=60260263&branchId=0453b76d-4c58-4e72-8f8f-df721e8e4486:70]: Cannot read properties of null (reading ‘getPosition’)

Sorry, not sure how you will go to setup this on your project. It may be your bone names are different and you will need to adapt the code.

I think @will @albertos may know more.


Is there anyway I can find my bone/joint names?

There are several ways:

  1. Import your model in a modeling app e.g. blender
  2. Import your model with Import Hierarchy option checked at your project settings:


  1. Open it in the PlayCanvas Viewer:



@Leonidas where is the import hierarchy option

never mind I found it

I found the bone names but how would I set up a ragdoll with all of these and what would the body be for it?

Hi @WilliamBoersma31! Below a link to the ragdoll project with my own model. Maybe you can find a difference in your setup. The difference I see is that you don’t have an entity with collision component (the body) for every bone.

How do you get the armature to appear in the editor?

The example project is made without the Full Hierarchy option, because the option didn’t exist at that moment. So the body entities are entities made myself in the editor. Maybe this is no longer necessary with the Full Hierarchy option, but you probably need to customize the script to make it work with the new functions.

how do I get full hierarchy

You need to enable the ‘Convert to GLB’ option first and after that you can enable the ‘Full Hierarchy’ option. You can find these options in your project settings.

I don’t see full hierarchy

Did you try to remove your old model and import it again?

I tried pressing re-import but it did nothing

Please try to remove your old model and import it again.

Now I can’t even use the model anymore