Problem with CycleMode.Rewind #161
-
startDelay is added between cycles with CycleMode.Rewind and a nasty hitch occurs. DOTween does not do this. Maybe it is done on purpose, but it seems to me that there should be no delay.
When using Sequence, there is no such problem:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, thanks for creating this thread. That is a very good question! The Sequences in PrimeTween work like a combined "timeline", so for a sequence with To address your specific case, this is what you probably want to achieve: apply the delay first, then play the jump animation. Here is how it can be achieved in code: float delay = 0.3f;
Sequence.Create()
.ChainDelay(delay)
.Chain(Tween.LocalPositionY(transform, high, .5f, Ease.Linear, cycles: 2, cycleMode: CycleMode.Yoyo)); |
Beta Was this translation helpful? Give feedback.
Hey, thanks for creating this thread. That is a very good question!
The
startDelay
parameter works by applying the delay at the beginning of each tween cycle. So, when you have two cycles withCycleMode.Rewind
, thestartDelay
is applied both before the forward and backward cycles, creating the hiccup you're describing.Sequences in PrimeTween work like a combined "timeline", so for a sequence with
CycleMode.Rewind
, the whole timeline is played forward, then backward. So, in the case of.ChainDelay(delay)
at the beginning, such delay will be played two times: at the beginning of the forward cycle and the end of the backward cycle.To address your specific case, this is what you probably wa…