Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweener doesn't keep final value from last tweener when combining as_relative and set_delay #91825

Open
Phoenixkaze opened this issue May 11, 2024 · 0 comments

Comments

@Phoenixkaze
Copy link

Tested versions

v4.2.1.stable.official [b09f793]

System information

Godot v4.2.1.stable - Windows 10.0.22631 - Vulkan (Forward+) - integrated Intel(R) Iris(R) Xe Graphics (Intel Corporation; 31.0.101.5445) - 12th Gen Intel(R) Core(TM) i5-12500H (16 Threads)

Issue description

This piece of code:

func _ready() -> void:
	progress_bar.value = 20
	var tween = create_tween()
	tween.tween_property(progress_bar, "value", 30, 1).as_relative()
	tween.tween_property(progress_bar, "value", -10, 1).as_relative().set_delay(1)

(if I am right) should tween the value of the progress bar to 50, then 40 in a delay of 1s. But it gets 10 in the end.

It works as expected if I remove set_delay and add a tween_interval.

It's not a bug of progress bar. It can be reproduced on other objects.

Seems the condition in PropertyTweener::start() makes it so?

Steps to reproduce

Run the main scene

Minimal reproduction project (MRP)

TweenerIssue.zip

@Phoenixkaze Phoenixkaze changed the title Tweener doesn't preserve final value from last tweener when combining as_relative and set_delay Tweener doesn't keep final value from last tweener when combining as_relative and set_delay May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant