Skip to content

Instantly share code, notes, and snippets.

@anthonyec
Last active July 10, 2023 22:06
Show Gist options
  • Save anthonyec/34df5ecb3b2975df4a8d259f59232512 to your computer and use it in GitHub Desktop.
Save anthonyec/34df5ecb3b2975df4a8d259f59232512 to your computer and use it in GitHub Desktop.
Staggering tweens in Godot 4
for node in nodes:
# Important to create tween for each node instead of using `get_tree().create_tween()`
# because it binds it to each node and also using a single tween for all of them
# has problems when awaiting the interval.
var tween = placeholder.create_tween()
tween.set_parallel(true)
tween.tween_property(node, "position", Vector2(100, 100), 0.3)
await tween.tween_interval(0.05).finished
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment