There was an error while loading. Please reload this page.
2 parents c28cc5d + 1660575 commit c5a7462Copy full SHA for c5a7462
1 file changed
scene/animation/tween.cpp
@@ -546,8 +546,9 @@ void PropertyTweener::start() {
546
return;
547
}
548
549
- if (do_continue) {
+ if (do_continue && Math::is_zero_approx(delay)) {
550
initial_val = target_instance->get_indexed(property);
551
+ do_continue = false;
552
553
554
if (relative) {
@@ -572,6 +573,10 @@ bool PropertyTweener::step(double &r_delta) {
572
573
if (elapsed_time < delay) {
574
r_delta = 0;
575
return true;
576
+ } else if (do_continue && !Math::is_zero_approx(delay)) {
577
+ initial_val = target_instance->get_indexed(property);
578
+ delta_val = Animation::subtract_variant(final_val, initial_val);
579
580
581
582
double time = MIN(elapsed_time - delay, duration);
0 commit comments