How to interpolate two properties in tween at the same time

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By TopBat69

Hi

I am making a game in the godot engine(of course). To make the game feel more alive and juicy I used the tween node for a landing and jumping animation. The jumping works fine as my character just squishes for a second or two. But for landing tween animation I need to interpolate the position and scale at the same time. I tried using two interpolate properties functions in the tween function but it scaled down the player first and then changed the position.

Can anyone help me with this

Can I see your code?

exuin | 2022-05-23 16:25

:bust_in_silhouette: Reply From: aipie

Hmm I guess you have already tried this, but this just works on my project.
In this case it the scale and the transparency at the same time.

func pickup() -> void:
	$Tween.start()


func _ready() -> void:
	$Tween.interpolate_property($AnimatedSprite, "scale"
		, $AnimatedSprite.scale, $AnimatedSprite.scale * 3, 0.3
		, Tween.TRANS_QUAD, Tween.EASE_IN_OUT)
	$Tween.interpolate_property($AnimatedSprite, "modulate"
		, Color(1, 1, 1, 1), Color(1, 1, 1, 0), 0.3
		, Tween.TRANS_QUAD, Tween.EASE_IN_OUT)