- Home /
Question by
Tageos · Jun 18, 2015 at 04:56 PM ·
animationinstantiate
Death animation
What is the best way to approach this. Should you instantiate the death animation exactly when the gameobject is destroyd or do the gameobject need to be in the universe when you play the death animation?
Comment
Answer by lloladin · Jun 23, 2015 at 11:03 AM
the way i did it is i spawn the death animation then destroy the game object
something like this
public Particle Deathanmation;
public Transform Player;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
if (condition)
{
Instantiate (Deathanmation, Player.position, Player.rotation);
}
}