Forum rules - please read before posting.

[Solved] Easy way to animate a character into poses and hold them? (2D)

edited September 2014 in Technical Q&A
I have a lot of different situations where I need to animate my 2D characters into certain poses, then hold these poses until I tell the character to do otherwise.

For example I need a character to play the custom animation ShowBadge_R which is an animation of the character taking out a police badge, and I need him to hold the last frame where he is holding the badge, while he says a few lines, and then I want to tell the animation HideBadge_R to play, which plays an animation of him putting the badge back, returning to the regular idle anim.

But this doesn't seem to work as the ShowBadge_R animation just keeps looping, so my solution so far has been to create an "intermediary" animation clip with one frame of him just holding his badge, like so:


While this works, would it be possible in the Character:Animate action to have a "Hold last frame" option so I can skip the intermediary animation click? Also, any chance of a "Reverse" option that will simply play the clip in reverse?

Or am I perhaps missing some easy way to do all this already that doesn't involve lots of extra animation clips?


  • Your animation clip can be set to *not* loop. Surely that would do it?

    Look at the anim clip as it exists in your project and view in the Inspector. Untick "Loop Time" and it won't loop.

    Alternatively you can simple have a custom second idle pose which only has the end pose in it.
    , but I don't think that should be necessary.

  • edited September 2014
    Ugh, yes you are right.

    It's one of those situations where I did try that, but when I played it it for some reason kept looping anyway, so I thought that for whatever reason AC took control over the clip and made it loop regardless (that's just dumb, so in hindsight I'm not sure why I assumed that).

    Now that I try it again it works as it should, so I must have done something very wrong previously. I'm a total newbie in Unity which is why I needed AC to get started with my game to begin with.

    Thanks, Xidore!
  • @Xidore: Thanks - I think that should do it, too.

    @Eastman: Please say if this doesn't work, and I'll revisit this.  As for the "reverse" option, I don't believe Mecanim currently has the ability to do this (though I'll gladly be corrected if it does).
  • The solution @Xidore propsed works perfectly. I don't know what I did wrong the first time around, but so far 90% of my issues have been ones that I could have solved with some more basic Unity knowledge  :\">
  • If you're using mechanim, setting the speed variable of a state to -1 should play the clip in reverse, but I don't think that actually works right now (could be wrong but I think I remember that not working).

    Your game looks rad btw!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.