- Home /
Question by
Gorov · Nov 27, 2011 at 06:35 AM ·
addforceraycasthitragdoll
Apply force to ragdoll after enemy death
When enemies die in my game they are replaced with ragdolls. I want to apply a force on the ragdoll's body part where the killing bullet of the live enemy hits. The problem is that transform.FindChild can't find the ragdoll's body part that were hit when he was alive. How can I find the right body part without recursive function?
Comment
Answer by DevonJavaScript · Nov 27, 2011 at 07:03 AM
Insantiate with the function
OnDeath(){
}
and have the creation be in the variable so you have it saved as a transform then you can instantiate a script or apply before you die
Var.rigidbody.AddForce;
Your answer
![](https://koobas.hobune.stream/wayback/20220613055016im_/https://answers.unity.com/themes/thub/images/avi.jpg)