Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Sliding panels - how to ease the animation?

Discussion in 'UGUI & TextMesh Pro' started by MarkOfVarberg, Aug 26, 2014.

  1. MarkOfVarberg

    MarkOfVarberg

    Joined:
    Sep 5, 2013
    Posts:
    11
    I'm new to uGUI (like most people) but also to mecanim.
    I needed to display a new window on top of the existing starting screen that I have. So I added 2 animations - 1 for showing and 1 for hiding the panel, which slides it in and out respectively. It works very well.

    But I would like to control the curves of the animations to try different things like bringing the panel in fast at the beginning and then slowing down to a stop. But when I go to the curves tab and try to apply a curve I'm finding it difficult to apply the same curve to all elements (anchored position y, max y and delta y) because the curves are starting at different ends of the scale.
    So what is happening is some elements (such as text in the header) are being resized during the animation and this is jarring.

    What I would like to do is just make my animations and then apply an ease type to it and not bother with the curves. Is there a way to do that?
     
  2. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Keyframes have tangents and with tangents you can achieve the ease-in or ease-out per curve. Right-clicking the keyframe gives you some options. We don't currently have presets like "ease-in" or "ease-out", but it's a great suggestion and we shall consider it.

    Unfortunately we don't even support multi-editing tangents right now, so you'll have to adjust them one by one. We are adding this feature in a future version.

    Thanks for the feedback!
     
  3. MarkOfVarberg

    MarkOfVarberg

    Joined:
    Sep 5, 2013
    Posts:
    11
    OK thanks for that!

    For beginners starting today, digging into the animation support for the first time is very confusing. The docs say "use Mecanim" and there is also a legacy animation system and I am just totally confused about what is legacy and what is mecanim and whether I need to use states and when etc.

    I think it would be great if you would consider making some presets and making it generally more clear about how to use the animation system and why there is a legacy. It is overwhelming when starting with Unity and wanting to do some "simple" animations. The tweening libraries that are available help a lot, but I would much prefer it if I could do everything with the standard Unity stuff (just like using uGUI instead of purchasing a 3rd party GUI system).
     
    Senshi likes this.