- Home /
How could I achieve Active Ragdoll effect like Overgrowth in Unity?
I'm trying to match ragdoll motion and animation with springs. What I've tried is just matching ragdoll bones and animation bones with spring joints and it works and I can set the force/strength of movement. I've got two skeletons animation and ragdoll. But is not enough for me. I don't want to use external Unity plugins like AnimFollow.
For now I only want to accomplish this effect:
ttps://youtu.be/zVWZbxGFGiA?t=2m11s
I've seen this videos and they could be great examples of what I want to do:
https://www.youtube.com/watch?v=zVWZbxGFGiA https://www.youtube.com/watch?v=CTMpsR6XI_s https://www.youtube.com/watch?v=b5HpwLopyXw -- (this effect is cool) https://www.youtube.com/watch?v=ajpBk7L2CVc -- (great one) https://www.youtube.com/watch?v=Su8mV4vMs2M
Wow! @Partel Lang :: https://www.youtube.com/watch?v=pt6YiqbfNOE
Today, this is a script I've made to try to achieve active ragdolls:
var Ragdoll:GameObject;
function FixedUpdate () {
var Animationbones : Transform[] = GetComponentsInChildren.<Transform>();
var Ragdollbones : Transform[] = Ragdoll.GetComponentsInChildren.<Transform>();
for (var Animationbone : Transform in Animationbones) {
for (var Ragdollbone : Transform in Ragdollbones) {
if (Animationbone.name == Ragdollbone.name && Ragdollbone.GetComponent.<Rigidbody>()) {
Ragdollbone.GetComponent.<Rigidbody>().MoveRotation(Animationbone.rotation);
Ragdollbone.GetComponent.<Rigidbody>().MovePosition(Animationbone.position);
}
}
}
}
I've got two models: a Ragdoll and an Animation skeleton. The problem I have with this script is that I can't use local position for free movement.