Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Inexperienced animator question regarding layers and staggered starts

Discussion in 'Animation' started by JokesOnMe, Feb 7, 2015.

  1. JokesOnMe

    JokesOnMe

    Joined:
    Feb 7, 2015
    Posts:
    4
    Hey forum-ites,

    I'm fairly new to animation in Unity. I have a basic human character setup to play an animation. Everything works fine, but I'm stuck using the legacy system. That being the case, I'm a little confused as to what to do to play multiple animations in a staggered fashion. Let me explain.

    Let's say I have 3 animations. Two of them move the head. One starts immediately and lasts for 2 seconds. A second one starts at 3 seconds in and lasts for another 2 seconds. The third animation only moves the hands. It starts one second in and lasts 3 seconds. To me, this suggests I should put the first two animations in the first layer, and the third one in the second layer. So that conceptually I have something like
    Layer 1 (head):-----start-animation1--end----start--animation2--end--
    Layer 2 (hands):------------start-animation3-----------end-----------------

    According to the docs, http://docs.unity3d.com/412/Documentation/Manual/AnimationScripting40.html

    It seems this needs to be additive blending correct? What I can't figure out from documentation is how do I effectively stagger the animations' start times? I can play them sure, but animation 2 needs to start after animation 1 and animation 3 on the other layer needs a staggered start time. I'm certain there is an obvious answer, I just haven't seen it. Thanks for any comments!
     
  2. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    I'm sure there must be a better way, but just off the top of my head, you could make animations inside of Unity that fill the time. If you just rightclick, create/animation in the project folder, then drop it into your Animator Controller, and adjust it in the Animation window to the time you need to fill. You should also be able to set up a Boolean variable, and trigger the animation with script.