Page 1 of 1

Ragdoll body parts fall through ground

Posted: Sat Nov 04, 2017 12:26 pm
by Tau
Hello, I'm trying to add a ragdoll to my game. I'm using the Ragdoll demo as basis for this. The problem is that when my ragdoll falls from higher height some of its body parts fall through terrain and it gets stuck. I'm using btHeightfieldTerrainShape for terrain and btTriangleMesh for buildings and static objects. I understand that the problem is caused by small diameter ragdolls limbs.
I wanted to ask:
How to simulate small objects?
How to make sure that small objects don't fall through ground?

I know that one way would be to increase the simulation speed. Are there other ways?

Re: Ragdoll body parts fall through ground

Posted: Sun Nov 05, 2017 10:25 pm
by drleviathan
I believe these strategies would help:

Increasing the substeps per second (reducing substep duration).

Avoiding thin (terrain, mesh, various flat) shapes and instead only using convex shapes or btCompoundShape collections of convex shapes for all objects.

Enabling continuous collision detection (CCD) might help.

Re: Ragdoll body parts fall through ground

Posted: Mon Nov 06, 2017 5:23 pm
by Tau
I didn't know what CCD was, I'm checking it out right now and i think i will go with that. Thanks.

Re: Ragdoll body parts fall through ground

Posted: Mon Nov 06, 2017 10:30 pm
by Octavius_Ace
I have a similar unresolved problem with any simple chain of rigid bodies and bad interpenetration with bhv tri meshes. CCD has not resolved the issues and I have to increase the sub-steps too high to be a practical solution in a game engine.
My assumption is that the non-solid nature of the tri mesh landscape is at least part of the problem.

I've posted here previously and have yet to resolve the issue in a robust and reliable way.
Also this problem has appeared on the forum a few times before and I've not seen a solution posted. (Other than use non-tri mesh solid static shapes)
I will eventually get round to looking into it further but it means understanding the low level narrow phase collision/response/constraint solver code in detail and in the absence of documentation, so it will be time consuming.

Please do post back if you resolve this to any degree.

Cheers.

Re: Ragdoll body parts fall through ground

Posted: Sat Aug 25, 2018 5:47 pm
by Octavius_Ace
For anyone searching for solutions to similar trimesh / ragdoll / constraint chain penetration problems, I was able to resolve my problems fully.
I've updated my original post with an explanation:
https://pybullet.org/Bullet/phpBB3/view ... =9&t=11481