- Home /
Pause Animation Clip wiothout rewinding
I have an animation clip "open" which has this piece of code attached:
animation["open"].wrapMode = WrapMode.Once;
animation.CrossFade("open");
I would like to play it once and "pause" it at the end of the clip so that the state of the animation stays there. As a result, I do not want the clip to rewind back to the starting point. It keeps rewinding back.
I tried doing this:
and this://if(end of clip)
animation["open"].speed = 0;
animation["open"].wrapMode = WrapMode.ClampForever;
But it does not work.
How should I solve this problem?
Comment
.speed = 0 should work.
How are you asking "if (end of clip)" ? Are you sure it's not reaching the end of the clip, starting again, then pausing on the first frame?
Ins$$anonymous$$d of setting it to Once, at the top, should be able to set it to ClampForever.