Hi everyone, me and my friends are working on a 2D side-scrolling brawler in the vein of something like Double Dragon Neon. We are currently working on a mechanic where every time the player hits an enemy the game freezes for a brief moment of time. We have been struggling however to freeze the enemies as well as the player's attack during these attacks. If there any way to freeze an animation in the middle, such as an attack, and then unfreeze it after a short period of time?
What about disabling the animator when you want to freeze your character ? Code (CSharp): anim = GetComponent<Animator> (); anim.enabled = false;
the best way to freeze the animation in an animator is to set the animator.speed to 0 https://docs.unity3d.com/ScriptReference/Animator-speed.html