Timeline for How to fix issues with repeated coroutines for lerping values?
Current License: CC BY-SA 4.0
2 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 5, 2020 at 19:32 | comment | added | MKorialstrasz Krasus | Coroutine queues are a bit outside my comfort zone :) That being said, while using a central update is not a desirable option for me, your if checks gave me an idea! :) Basically in my example, I would also add a check: while(i < lerpDuration && _experienceBarFill.fillAmount < amountToFill)... This will ensure the previous instances of the same coroutine will end and the new one will take over (so long as the values are going up and not down xDD ) This creates another conundrum to solve, i.e. reversing the check values when they're going down and not up without creating a separate coroutine | |
Nov 5, 2020 at 19:05 | history | answered | andrew zuo | CC BY-SA 4.0 |