Hi! i know this question is asked every other week, but i searched the answers database and none of the answers i found were working for me and i didn't want to comment on an old thread so I'll just ask this again, how do i make this wait until the animation is finished?
function Spawn()
{
animation.Play("DIE");
rigidbody.AddForce(Vector3.down * 200);
transform.position = spawn.position;
}
NOTE 1:
I've tried putting the second part of the code (
rigidbody.AddForce(Vector3.down * 200);
transform.position = spawn.position;
)
on a diferent function and then calling that from the unity animation panel but that didn't seem to work either =/
NOTE 2:
I'm a noob in unity and javascript so please bare with me ^^
↧