Search Unity

Using timeline to combine character animation with audio

Discussion in 'Timeline' started by arvzg, Sep 18, 2018.

  1. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    Hi guys,

    When swinging a sword in my game, 3 things happen in different times. An animation plays, a sound plays, and a trigger occurs which is when the collision check and damage is applied to the enemy. So far I've been using animation events to time these to happen at the right time alongside the animation, but I'm thinking of using timeline to sequence these instead.

    Put the animation in the timeline, the audio, and a custom track that triggers the collision/damage, and just play the timeline.

    Just wondering if this would be a good use of timeline, and if there would be any major drawbacks to doing things this way,

    Thanks
     
    Last edited: Sep 18, 2018
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Yes, absolutely. That is a perfect use case for a re-useable timeline.