- Home /
Ragdoll problems
I'm trying to get my ragdoll character working. The problem is that when the character collides with another object with enough velocity, some joints behave unconsistently. Sometimes the upper part of the legs bend a lot more than it's limits and are then stuck to that orientation. Upper legs partly inside the body for example. Sometimes a hand gets stuck inside the torso as well.
I've also noticed that with hard enough impact the joints get separated (stretching). For example, the head gets out of its "socket" and then returns back to it's correct position. Are there any workarounds or can this be fixed with some adjustments?
Another main concern is that when the ragdoll drops on the ground, it never goes to sleep state, no matter what values I put into the Sleep Velocity or Sleep Angular Velocity. I've tried playing around with drag values etc.
Any help on either problem?
Thanks in advance!
On the ground, does it always "jiggle" a tiny bit, or slide slightly, and in general look figity? That usually means the positions, sizes masses of the joints/colliders need adjusting.
The jiggle is almost unnoticable. It's more like the arms slowly twisting back and forth when lying on the ground. The character is not stuttering or anything. I've managed to fix the joints from "overbending" by adjustin the body collider size and $$anonymous$$ penetration for penalty setting. Or at least I have not been able to reproduce it.
The reason why I need the ragdoll go into sleep state is that I want to reload the scene when the ragdoll is on the ground and not moving anymore. Any workaround to accomplish this?
Anyone? The main problem is now, that I still can't get the ragdoll to sleep. The stretching is still there, but I can live with it, barely.
Answer by Owen-Reynolds · Aug 15, 2014 at 09:36 PM
Ragdolls can be very finicky. I've had several, esp. with longer "bone chains," that tended to sway like seaweed, and gently crawl like a worm ... and was able to tweak them to stop that. I can't pick out any rules, but you get a feel for distance between colliders, center of the joint, mass, springiness (I've found that a hard max bend tend to glitch more as it hits that limit -- better to have a strong spring past the limit,) drag on the individual RBs.
But if you need to, don't rely on Sleep. Wait 5 seconds, or until main body velocity is less than 0.01 but for sure after 10 seconds. And if the guy is still twitching when the game resets, no harm done. No one wants to watch him slowly slide down a shallow incline for 30 seconds.
Thanks Owen,
I'm still working on the stretching. Hope I'll get it fixed when using the more "final" model+rig. I've gotten the level to reload with a combination of sleep and velocity check.
Your answer
Follow this Question
Related Questions
How to make Character Joint rotate towards a rest position? 0 Answers
How to set Character Joint "Twist Limit" to current transform rotation? 1 Answer
Rigidbody has zero velocity but still moves 2 Answers
Add velocity / forces from object to instantiated ragdoll 1 Answer
Floating ragdoll after wakeup 3 Answers