playMaker

Author Topic: How to stop/interrupt an animation and play another animation  (Read 6447 times)

Richardm1985

  • Playmaker Newbie
  • *
  • Posts: 15
Well exactly what the title says. I have two objects, I have them both animated using mecanim and when they collide I want them to stop their current animation and play a different animation.

I also have downloaded the "animator" actions from the wiki.

Thanks guys,

Arnoob

  • Junior Playmaker
  • **
  • Posts: 63
Re: How to stop/interrupt an animation and play another animation
« Reply #1 on: May 03, 2015, 03:56:05 PM »
Hi Richardm
To do so, if you are using the animator with mecanim, you simply need to uncheck the box "has exit time" in the transition from the animation you want to stop to the animation you want to play.
If "has exit time" is checked, the animator will wait for the current animation to finish before playing the next. Also, check the transition and make it as quick as possible in the graph below "settings"

Richardm1985

  • Playmaker Newbie
  • *
  • Posts: 15
Re: How to stop/interrupt an animation and play another animation
« Reply #2 on: May 04, 2015, 02:26:14 AM »
Thanks Arnoob! that was simple as!

What if I just want an animation to stop abruptly? Like half way through an animation or a third or whenever a certain collision happens?

Arnoob

  • Junior Playmaker
  • **
  • Posts: 63
Re: How to stop/interrupt an animation and play another animation
« Reply #3 on: May 04, 2015, 08:20:44 AM »
You can set the transition time beetween the two animations in the time scale just under the "has exit time" button.
Simply change the size of the blue area on the time scale as you want.

Also, don't forget to tag your topic as "SOLVED" if you had your answer ;-)