Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Details of transitioning between animations for Sprites animations

Discussion in 'Animation' started by EdwardDKings, Aug 1, 2020.

  1. EdwardDKings

    EdwardDKings

    Joined:
    Feb 12, 2016
    Posts:
    2
    Hello everyone, thanks in advance for any and all support...

    I’m working on an 8-Bit style pixel-art game. Sprites and frames all the way. Thing is I haven’t been able to get 2 animation behaviors just how I want them.

    I’ve tried using the built-in Animator System, I wrote Scripts with the help of the internet and now I ended up using an Extension called “Animancer” (which I really liked). When one animating system solves one of the problems, then I don’t know how to solve the other one, or vice-versa.

    Here are the things I’m solving for (I’ll use Mega Man as an example) …

    First: How would I go about making an animation starts with a specific frame, or part of animation and then loop between another specific part of the animation without going to those starter frames?

    Second: If I have two animations one is running, and one being running and attacking, and they have the same number of frames, how do I transition from “running” frame 3 to “running and attacking” frame 3, and continue looping on the current animation.

    NOTE: As I said, I kinda managed to get this working using “Animancer” but the way I did was completely “hacky” and not sustainable. I know there’s a lot of things I’m not seeing that are making this harder than it needs to be. I'm completely open to Animator/Scripting/Any kind of solutions to look into.

    EXAMPLES Below…

    upload_2020-7-31_19-44-54.png
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    1,086
    First: just use two separate animations. In Animancer you could use an End Event or in an Animator Controller you could have two states with an Exit Time transition.

    Second: Animancer's Mixers or Blend Trees in an Animator Controller will automatically handle Synchronisation for you.
     
  3. EdwardDKings

    EdwardDKings

    Joined:
    Feb 12, 2016
    Posts:
    2
    Thank you for your support Kybernetik! I was trying to do just what you mentioned earlier and it just seems there are a few issues with how I'm building/understanding animations between state changing, player input, etc.

    I've managed to work something out at the moment, as per your recommendation, and I will move forward with it. Thank you.
     
unityunity