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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

How to play timeline for 50 warriors in a pack, moving and with animation?

Discussion in 'Timeline' started by paullam328, Jul 21, 2019.

  1. paullam328


    Oct 11, 2017
    Can I stack Playable such that there's 1 playable per pack of warriors, and each warrior has his own playable? Or I need 50 timeline playables? I think there would be a better solution than such for 50 patrolling warriors moving in the same speed and direction... The thing is, I need a playable per warrior for animation in general, since playable for the whole pack doesn't seem to handle animation transitions properly...

    When I tried to stack playables on a pack over each warrior, the playable on the pack doesn't even attempt to record the position update of the pack... 50 playables just sound inefficient...
    Last edited: Jul 21, 2019
  2. paullam328


    Oct 11, 2017
    So I can safely assume the functionality of timeline controlling the movement and animations of a group does not exist in Unity, in which I have to implement 50 timelines for 50 independent characters? What if it's 500 warriors moving as a pack? 500 independent timelines? Such inefficiency...
  3. MadeFromPolygons


    Oct 5, 2013
    Its not inefficiency, you just havent read all of the docs.

    Bottom line is: You can do all of that with playables, basically you make your own timeline clip type + track and then you can do whatever you want.

    I cant remember the exact blog post but a lot of it is dealt with here:

    So basically you want to make a playable that allows you to slot in a range of your warriors into a list, and then will perform the timeline animation + movement on every warrior in the list on each frame.

    I havent messed with playables in a while so it could be that its doable without a custom playable now, someone else may know more about that.

    Good luck!
  4. seant_unity


    Unity Technologies

    Aug 25, 2015
    Alternately you can create one timeline that plays using an Animation track with Scene Offsets (so that the character placement is where they are placed in the scene), then create 50 playable directors, each with a different binding. i.e. play the same timeline for each character.

    The tradeoff here is
    - there exists only one timeline asset (good!)
    - there exists one gameObject + playableDirector for each character (bad!)
    - there exists one playable graph for each character (neutral - a timeline with 50 tracks would have 50 subgraphs).

    That assumes you want them all in sync, but if you wanted variance you could play with the speed and initial time of each individual playable director.
    MadeFromPolygons likes this.