Demigiant Forum

Unity Assets => DOTween & DOTween Pro => Topic started by: Thenamelessone on June 29, 2015, 08:21:37 PM

Title: Incemental Timing
Post by: Thenamelessone on June 29, 2015, 08:21:37 PM
Hey!

Just wondering how do I control the pause when using incremental looptype. So say I am rotating 90 degrees each increment.

It takes 2 seconds to rotate 90 degrees. How do I say... pause 5 seconds then go to the next 90 degree increment.

Thanks!
Title: Re: Incemental Timing
Post by: Daniele on June 29, 2015, 08:41:14 PM
Hi!

If you want a pause to happen after each loop run, you should use Sequences, like this:

Code: [Select]
DOTween.Sequence()
   .Append(myTransform.DORotate(new Vector3(0, 90, 0), 2))
   .AppendInterval(5)
   .SetLoops(-1, LoopType.Incremental);

Cheers!
Title: Re: Incemental Timing
Post by: Thenamelessone on June 29, 2015, 08:52:14 PM
Thanks! I love your product :)
Title: Re: Incemental Timing
Post by: Daniele on June 29, 2015, 08:54:37 PM
I'm happy about that! :)