|
Hey I want to use the 'wait' function so that I can freeze my animation for some interval of time. I want to use this 'wait' function as an Event in my animation but it doesnt work. function wait () { yield WaitForSeconds(5.0); //WaitForSeconds (5); } why not?
(comments are locked)
|
|
You probably call it like this:
But you need to yield to whatever it yields, like this:
(comments are locked)
|
|
you can't use yield WaitForSeconds as an event to freeze your animation WaitForSeconds suspends the execution of your code only . Yeah, you'd have to set the speed for the animation state to 0, wait, then set the speed back to whatever it was before (usually 1)
Apr 10 '11 at 06:07 PM
Statement ♦♦
how do i set animation speed? and it can be changed for each frame?
Apr 15 '11 at 07:16 AM
Algernon 1
if you want to freeze your animation try this method: 1-split your animation in two (one before where you want to freeze and one after ) 2-call your animations and use wait between them gameObject.animation.Play("first animation"); yield WaitForSeconds (5); gameObject.animation.Play("second animation"); This worked good for me Ps:the animation that i used were imported from maya
Apr 15 '11 at 07:35 PM
Mai hime
(comments are locked)
|
