+1 vote

I've got a tween setup with the following on a sprite:

tween.interpolate_property(sprite, "visibility/opacity", 1.0, 0.0, 0.3, Tween.TRANS_QUAD, Tween.EASE_OUT)
tween.interpolate_property(sprite, "scale", sprite.get_scale(), Vector2(1.7, 1.7), 0.3, Tween.TRANS_QUAD, Tween.EASE_OUT)

The scale works fine, but not the transparency. What's the equivalent in V3.0?

asked Feb 3, 2018 in Engine by imekon (229 points)

2 Answers

+4 votes
Best answer

You can use "modulate:a" to change the opacity.

tween.interpolate_property(sprite, "modulate:a", 1.0, 0.0, 0.3, Tween.TRANS_QUAD, Tween.EASE_OUT)
answered Feb 3, 2018 by Skyfrit (406 points)
selected Feb 3, 2018 by imekon
0 votes

Hi.
From what I gather, it's under CanvasItem/Modulate - you have Alpha value there.

answered Feb 3, 2018 by seeeking (33 points)

I tried "CanvasItem/Modulate" but that had no effect. So I tried "CanvasItem/Modulate/Alpha". That didn't work either. So to use tween to adjust alpha, how does it work?

I selected the answer "modulate:a" as that worked.

imekon, ah, sorry, I misinterpreted the question, my bad, I thought you were asking about Editor properties.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.