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

Unity3D enemy AI ragdoll

$
0
0
Hello guys, I got a problem with my enemy AI / ragdoll, when the enemy AI dies, he gets replaced by a prefab(ragdoll) and that works perfectly except one thing, the ragdoll spawns in the T-position and how would I do to fix that so the ragdoll spawns in the exact position as the enemy AI. Ima post my damage/spawn Ragdoll script below { public GameObject RagDoll; public float RobotHealth = 100f; void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Bullet") { audio.Play(); RobotHealth -= 20f; if(RobotHealth == 0) { GameObject go = Instantiate(RagDoll, gameObject.transform.position, gameObject.transform.rotation) as GameObject; Destroy(gameObject); } } } } The AI script I'm using is from AronGranberg (The A* AI, the free version).

Viewing all articles
Browse latest Browse all 565

Trending Articles



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