Search Unity

Freezing Animation Mid Animation

Discussion in 'Animation' started by ABAKOS1, Oct 31, 2016.

  1. ABAKOS1

    ABAKOS1

    Joined:
    Oct 31, 2016
    Posts:
    4
    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?
     
  2. Kwel

    Kwel

    Joined:
    Jun 9, 2014
    Posts:
    80
    What about disabling the animator when you want to freeze your character ?

    Code (CSharp):
    1. anim = GetComponent<Animator> ();
    2. anim.enabled = false;
     
  3. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675