Quantcast
Channel: Questions in topic: "ragdoll"
Viewing all articles
Browse latest Browse all 565

Problem enemy ragdoll duplicate.

$
0
0
Hello. I have a problem with my enemy. The enemy to a ragdoll, ragdoll with script for the function of the bones. When I duplicate the object and then I'm going to shoot the third to the second and first, everything works fine. When the first shot, but it does not fall falls on the second, while the first remains stationary. I duplicated in the sequence as shown in the picture. What's the problem? ![alt text][1] This is the script attached to hit prefab. function OnCollisionEnter (col : Collision) { if(col.gameObject.tag == "Enemy") { gameObject.Find("Enemy sisi").SendMessage("killRagdoll"); } Destroy(gameObject, 3); } Script enemy ragdoll. var boneRig : Rigidbody[];//used to store the rigidbody bones of our ragdoll function Start () { boneRig = gameObject.GetComponentsInChildren (Rigidbody); //grabs the rigidbodies of our bones to start } function killRagdoll () { for (var ragdoll : Rigidbody in boneRig) { ragdoll.isKinematic = false; //disables the animated ragdoll and turns it into just a regular ragdoll with no movement } GetComponent(Animation).enabled=false; //disables the mecanim animator so our character no longer has any animations playing } [1]: /storage/temp/17377-ragdoll.jpg

Viewing all articles
Browse latest Browse all 565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>