I'm trying to make a simple hack'n slash game with real time battles and have some questions.
Is there a way to stop my player movement while performing an attack?
I have an attack event set up like this: start > play attack animation > wait 0.5s. Using mecanim animations.
If I press an attack button while running, player just freezes for 0.5s and no animation plays.
If I remove the "wait" node, player briefly stops and continues running, also no attack animation.
I need him to stop running and perform an attack.
  • Add a Wait node before playing the attack animation, e.g. wait for 0.1 seconds (or even 0.0 to just wait a frame).
    Mecanim might just ignore your request to play the attack animation due to being in transition or not having a transition from the current state.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • That worked great, thank you.
Sign In or Register to comment.