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

Best practices for an ability system with Timeline?

Discussion in 'Timeline' started by FoxlightGames, Oct 28, 2017.

  1. FoxlightGames


    Oct 28, 2017
    Hullo! So I'd like to use Timeline to play out the effects of abilities, and I could use some tips about best practices. If anyone can provide insight about how such a system ought to work, it would be appreciated.

    1. I would like to keep as much of the ability animation logic in the Timeline as possible, but I'm not sure how to include complex locomotion states like one might have in an animation controller. For example, going from normal locomotion to a charging-up locomotion state.
    Would this ultimately need to go into the character's controller itself, or is there some way to inject the state with Timeline?

    2. A basic linear sequence is pretty easy, but what if I want the player to channel an ability indefinitely until a button is released? Since this requires a loop, I don't think a single timeline will work. So I figure a sequence of timelines would be best.

    The main question is how to properly ease in and out of these looped timelines. I don't think control tracks would work for this, since that still implies a linear sequence of events. I'm thinking giving the Ability script a list of individual "action" timelines to spawn in sequence, some of which could be looped. But what confuses me is blending in and out of these, since looped timelines can't ease in or out properly.

    What I'm thinking it that the timeline could be made to activate specific states on the character's animator, so the timeline only has to handle the non-looping animations.
    Anyone have any thoughts on this?