Hi! I use async version DoTween 1.2.365 anf have problem in this code:
_tweener = element.transform.DOScale(new Vector3(1.25f, 1.25f, 1.25f), 0.5f)
.SetLoops(-1, LoopType.Yoyo)
.Play();
LoopType.Yoyo working as LoopType.Restart. What is the problem?
Yes, I have the same issue, that seems because of this commit.
And I fixed this by changing
bool useInversePosition = t.loops > 1 && t.loopType == LoopType.Yoyo
&& (t.position < t.duration ? t.completedLoops % 2 != 0 : t.completedLoops % 2 == 0);
to
bool useInversePosition = (t.loops == -1 || t.loops > 1) && t.loopType == LoopType.Yoyo
&& (t.position < t.duration ? t.completedLoops % 2 != 0 : t.completedLoops % 2 == 0);
@Demigiant Is this modification OK?
Thanks for the pinpoint, investigating it! :)
And you were completely right, here's an updated version that fixes that :)
I made a thorough check and found a similar bug in path tweens and infinite Yoyo loops, which I now fixed there too.
Thank! Great job.
чт, 21 мая 2020 г. в 14:54, Daniele Giardini notifications@github.com:
And you were completely right, here's an updated version
http://dotween.demigiant.com/tmp/DOTween_1_2_396.zip that fixes that :)I made a thorough check and found a similar bug in path tweens and
infinite Yoyo loops, which I now fixed there too.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Demigiant/dotween/issues/390#issuecomment-632045261,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXFUD7ICGAFEMCIT27PFR3RSUI6FANCNFSM4MMUUJPQ
.