Skip to content

Sequence timing issues: durations shorter than defined, slowing over time #704

Description

@XOGamesHyoju

DOTween version : 1.0.381

I'm using DOTween's Sequence to control a UI animation. However, the timing of the sequence does not behave as expected. It seem to be executed faster than the defined values at first, but then progressively slow down. The sequence does not respect the exact timing I set via AppendInterval or tween durations.

Below is my Sequence code. I also logged timestamps using Time.realtimeSinceStartup to verify the timings. The log outputs (attached as an image) show that the actual times deviate significantly from the expected durations.

Image

Sequence seq = DOTween.Sequence();
        if (delay > 0)
        {
            Debug.Log("Start Seq | Delay: " + delay + " Time: " + Time.realtimeSinceStartup);
            seq.AppendInterval(delay);
        }
        seq.AppendCallback(() =>
        {
            Debug.Log($"Start Seq | [After Delay] Time Passed: {Time.realtimeSinceStartup - startUnscaled:F3}");
            startUnscaled = Time.realtimeSinceStartup;
            Debug.Log($"Start Seq | [After Delay] Time: {startUnscaled}");
            bannerImage.DOFade(1, 0.2f);
        });
        seq.Append(_bannerTrans.DOScaleX(1, 0.6f).SetEase(Ease.OutBack));
        seq.AppendCallback(() =>
      {
          Debug.Log($"Start Seq | [After 0.6f] Time Passed: {Time.realtimeSinceStartup - startUnscaled:F3}");
          startUnscaled = Time.realtimeSinceStartup;
          Debug.Log($"Start Seq | [After Delay] Time: {startUnscaled}");

      });
        seq.AppendInterval(0.2f);
        seq.AppendCallback(() =>
      {
          Debug.Log($"Start Seq | [After 0.2f] Time Passed: {Time.realtimeSinceStartup - startUnscaled:F3}");
          startUnscaled = Time.realtimeSinceStartup;
          Debug.Log($"Start Seq | [After Delay] Time: {startUnscaled}");

      });
        seq.Append(_titleTextTrans.DOScale(1.3f, 0.3f)).SetEase(Ease.OutQuart);
        seq.Join(_titleTextTrans.DOLocalMoveY(_textOriY, 0.3f).SetEase(Ease.OutBack));
        seq.AppendCallback(() =>
   {
       Debug.Log($"Start Seq | [After 0.3f] Time Passed: {Time.realtimeSinceStartup - startUnscaled:F3}");
       startUnscaled = Time.realtimeSinceStartup;
       Debug.Log($"Start Seq | [After Delay] Time: {startUnscaled}");

   });
        seq.AppendInterval(0.2f);
        seq.Append(_titleTextTrans.DOScale(1f, 0.1f).SetEase(Ease.InOutSine));
        seq.AppendCallback(() =>
     {
         Debug.Log($"Start Seq | [After 0.3f] Time Passed: {Time.realtimeSinceStartup - startUnscaled:F3}");
         startUnscaled = Time.realtimeSinceStartup;
         Debug.Log($"Start Seq | [After Delay] Time: {startUnscaled}");

     });
        seq.AppendInterval(0.4f);
        seq.AppendCallback(() =>
      {
          Debug.Log($"Start Seq | [After 0.4f] Time Passed: {Time.realtimeSinceStartup - startUnscaled:F3}");
          startUnscaled = Time.realtimeSinceStartup;
          Debug.Log($"Start Seq | [After Delay] Time: {startUnscaled}");

      });
        seq.Append(_canvasGroup.DOFade(0, 0.1f));
        seq.AppendCallback(() =>
      {
          Debug.Log($"Start Seq | [After 0.1f] Time Passed: {Time.realtimeSinceStartup - startUnscaled:F3}");
          startUnscaled = Time.realtimeSinceStartup;
          Debug.Log($"Start Seq | [After Delay] Time: {startUnscaled}");

      });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions