Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

How to wait until an animation is finished.

$
0
0
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 ^^

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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