Skip to content
tweens.gd

GDScriptBeta

Your first tween

Click anywhere on the stage. The line of code at the bottom sends the Godot icon there.

Animations are paused

Reduce Motion is on, or Animation Effects are off.
(e.g. in your accessibility settings)

Applies to this demo until you reload.
Tweens.play(self, Tweens.position_2d([864, 324], 1.2, Out.BACK))
Ease

Create a 2D scene and drag icon.svg from the FileSystem dock into it. Attach this script to the new Icon node, then run the scene and click around.

click_to_move.gd
extends Sprite2D
func _unhandled_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.pressed:
Tweens.play(self, Tweens.position_2d(event.position, 1.2, Out.BACK))
  1. Catch the click. Godot passes every mouse press that no UI control used to _unhandled_input().
  2. Start the tween. Tweens.position_2d() describes the move: to the click in 1.2 seconds, where Out.BACK overshoots, then settles. Tweens.play() starts it on this node and returns at once; the tween plays over the next frames.

Other properties work the same way, such as Tweens.scale_2d(), Tweens.rotation_2d(), and Tweens.modulate(). The catalog lists them all.

tweens.gd is made with math & ferrets, copyright © 2026 its contributors.

Godot logo by Andrea Calabró, licensed under CC BY 4.0.

"Easy, the Ferret" illustrations drawn by foxy_maria.

tweens.gd is released under the MIT License.

Godot is licensed under the MIT License.
tweens.gd is not affiliated with or endorsed by the Godot Foundation.