Announcement

Collapse
No announcement yet.

An unsolicited piece of advice regarding Timeline nodes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    An unsolicited piece of advice regarding Timeline nodes

    Fun fact, the Update pin of a Timeline node does NOT fire every Tick. The Tick of any given actor and the pulsing of the Update output of its timelines is ASYNCHRONOUS.

    I was using Timelines as a shorthand to avoid Gate + Custom-Event-Passing-Event-Tick setups for a lot of things which required delta time compensation (mostly setting actor locations for certain special movement modes), using "Get World Delta Seconds" where delta time was needed. This worked well enough to SEEM like a good idea, but I would still get the occasional jittering or jerking of position.

    Switching back to the Gate + Tick system fixed this in 100% of cases. I don't know what controls the timing of a Timeline's update pin, but you should REALLY avoid using them for anything like actor or component movement which is delta-time-sensitive!

    Just a fun fact for the day, I had spent so long grappling with this that seeing it finally stop being an issue so completely based on this one change made me feel like sharing.

    #2
    I have always been curious how often the timeline update fires and if this is synced to the normal event tick or not. I've not had any jitters with moving stuff based on timelines though, curious.

    Comment


      #3
      I didn't either... MOST of the time. Where it tended to happen was in situations where I was transferring data from one tick to another— literally my two problem cases were making an enemy track the vertical position of the player every tick, and passing foot transforms for an IK solver from my character to his animBP every tick (so, situations where two different Ticks must always fire in the exact same order no matter what)

      I think what happens is that Timelines fire every FRAME, but their position in the "Tick Stack" or whatever changes. So you get jittering because sometimes the value that the Timeline pulls happens before one actor gets a chance to update and sometimes after, depending on what ticks first; using Custom Events / gates guarantees this doesn't happen since the order in which the events fires is always 100% consistent.

      Comment


        #4
        Ah I guess I could see an issue if you were using normal ticks to track one thing and timeline updates to track something else, that perhaps they wouldn't always line up. But I'd still love to hear from Epic exactly how timeline updates are handled if they are independent of ticks, I don't really see how they could be though.

        Comment


          #5
          I think strictly speaking NOTHING is Tick-independent (except physics if you substep) BUT stuff gets queued up to fire in a certain order every tick. Timelines are not consistent in this regard (i.e. Timeline nodes do not sequentially Update in order every Tick of a given Actor from first to last after the main Tick execution is finished).

          To test exactly what's up you could probably just attach a Print String node to both a Timeline and Event Tick with separate-color text output and watch what happens; you won't get a nice even alternation but beyond that I'm not really sure what would occur.

          Comment

          Working...
          X