0 votes

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

in Engine by (73 points)

Can I see your code?

1 Answer

0 votes

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)
by (244 points)
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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.