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

Tweening modulate property doesn't behave right on 4.2 #85644

Closed
germanbv opened this issue Dec 2, 2023 · 1 comment · Fixed by #85681
Closed

Tweening modulate property doesn't behave right on 4.2 #85644

germanbv opened this issue Dec 2, 2023 · 1 comment · Fixed by #85681

Comments

@germanbv
Copy link

germanbv commented Dec 2, 2023

Godot version

4.2-stable_mono

System information

Windows 10, NVidiaRTX 2070

Issue description

After updating to 4.2 I've realized that all my tweens working with the property "modulate" or "self_modulate" were behaving strangely... it happens when you use loops.. for instance if you have:

tween.SetLoop();
tween.TweenProperty(godotObject, "modulate", Colors.Red, 0.5f)
tween.TweenProperty(godotObject, "modulate", Colors.Blue, 0.5f);

that object should change its color from red to blue and then from blue to red and then loop, right? (basically, because its final value should be blue)

well, after 4.2 .. the color resets to its default color before starting a new loop, this didn't happen on older versions.
If you don't use Loops its final value persists, so the problem is only when using Loops.

so, for example if you had a modulate value of White before starting the loop.. the tween will change its modulate from red to blue, then resets to white and then start over again...

  • I haven't tested on GDScript

Steps to reproduce

1- Create a CanvasItem such as a white ColorRect, so that you can tween its modulate property.
2- Attach a script that runs the following code (C#):

  tweener = this.CreateTween();
  tweener.SetLoops(0);
  tweener.SetEase(Tween.EaseType.Out);
  tweener.TweenProperty(godotObject, "modulate", Colors.Red, 0.5f);
  tweener.TweenProperty(godotObject, "modulate", Colors.Blue, 0.5f);

The modulate will change its value to default each time before starting a new loop

Minimal reproduction project

N/A

@germanbv germanbv changed the title [4.2] Tweening modulate property doesn't behave right on 4.2 Tweening modulate property doesn't behave right on 4.2 Dec 2, 2023
@germanbv germanbv changed the title Tweening modulate property doesn't behave right on 4.2 Tweening modulate property doesn't behave right after updating to 4.2 Dec 2, 2023
@germanbv germanbv changed the title Tweening modulate property doesn't behave right after updating to 4.2 Tweening modulate property doesn't behave right on 4.2 Dec 2, 2023
@kleonc
Copy link
Member

kleonc commented Dec 2, 2023

Broken between v4.2.dev3.official [013e8e3] and v4.2.dev4.official [549fcce].
Seems like regression from #80702, cc @KoBeWi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants