- Home /
Getting with the times... learning Mechanim/Animator
Hey guys,
I'm trying to progress from the legacy animation system, I've become stuck while trying to use a second layer to override the base layer to have my player attack.
I want him to attack once then go back to walking or idling or whatnot. Problem is, once the trigger parameter triggers, it keeps looping indefinitely. How do I get it to quit with this layer and just go back to playing nothing?
I would think the trigger would allow this behaviour as it is only "true" for one frame.
Thanks! see pic for stuff
Your attack states dont have an exit transition, might loop over and over and over. Use SetBool
Answer by Rtyper · May 08, 2015 at 07:29 PM
You need to add a transition back from your attack state to your idle state, using exit time with no other conditions. That way, when the animation is finished, the state machine will transition back.
thanks! that's correct. Now... with my layers set up properly, it doesn't go back to automatically playing my base layer.
it seems to be stuck in attack layer playing nothing... how do i get it to "not enter" attack layer? or should this all be in one layer?
i'll mark this as correct but i'm just tryin to get a part 2 freebie