Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Richardm1985 on May 03, 2015, 08:36:08 AM

Title: How to stop/interrupt an animation and play another animation
Post by: Richardm1985 on May 03, 2015, 08:36:08 AM
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,
Title: Re: How to stop/interrupt an animation and play another animation
Post by: Arnoob 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"
Title: Re: How to stop/interrupt an animation and play another animation
Post by: Richardm1985 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?
Title: Re: How to stop/interrupt an animation and play another animation
Post by: Arnoob 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 ;-)