|Attention||Topic was automatically imported from the old Question2Answer platform.|
|Old Version||Published before Godot 3 was released.|
I am working on my 2d character’s death :). This will be a ragdoll-like effect (I don’t know how to say this sorry).
I am using rigid bodies (with collision polygons) as body parts (head/arm/leg… etc), and pin joints to connect them.
It works approximatiely as I expected:
My problem is that the gravity is too slow, so I changed the “gravity scale” property from 1 to 50 (in all rigid bodies).
From this point everything goes wrong.
The second gif shows the funny result:
What am I doing wrong?
Is there a relevant tutorial about these tools somewhere?
Instead of gravity scale try changing the mass of the different ragdoll parts.
eons | 2017-02-26 17:30
Thank you for the answer!
I am not a physics expert, but IMO the mass has no effect on the speed/acceleration of free fall.
I noticed, that sometimes the bodies ignore their collisionshapes, and go to wrong states (overlap each other)… then the character goes mad :).
I have no idea yet…
bruteforce | 2017-02-26 18:36
I made a simplified project, which shows a similar issue.
It has only 2 rigid bodies and 1 pin joint.
Link: google drive
Can you check it?
Thanks a lot!
bruteforce | 2017-02-26 18:52
Free fall in a vacuum does not depend on mass, but default settings have something else, the linear damp, which is non zero by default, and may affect it on some motions.
The mass will affect the bounces too.
I’ll check the project.
eons | 2017-02-26 19:42
Tried with 0 damp on one of the bodies and feels better, 128 damp on red and you get a nice (but useless) parachute xD
eons | 2017-02-26 19:53
You are right, I tried 0 damp, and it is really better!
But the real project has 16 bodies connected and I don’t know which one(s) should I choose ?
I’m not familiar with these settings (ie. damp - linear/angular), so now i’m just randomly trying… I have to learn more!
I need coffee!
bruteforce | 2017-02-26 20:19
Well, I’m kind of confused by the damp, I think that on other physics engines is different or scaled up (and the way mass affects the damp is weird).
Not sure how will be the best combination, you may need to put your ragdoll on horrible situations and see how reacts to different settings, use live edit too, that will be faster to test.
I use to override all the physics settings with a huge area with space override (replacing damp, gravity), maybe is not the optimal method but that way I have a quick access to some general physics settings on the editor.
Oh, and high friction may help some parts to get stuck on surfaces
eons | 2017-02-26 20:45