Ok, so I'm workin and an fps survival type game. I have a healthh script and when my health < 0 it call a "Dead" function and will destroy game object.
How would I script it to go limp (Like ragdoll?) fall to the ground according to physics and the destroy object(on a timer?)
I kind of have an idea but I'm still learning Javascript in Unity.
function Dead()
{
Debug.Log("Im Dead");
//destroy enemy
Destroy(gameObject);
}
↧