C#Beta
Your first tween
Click anywhere on the stage. The line of code at the bottom sends the Godot icon there.
Scripting it
Section titled “Scripting it”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.
using Godot;using tweens.gd;
public partial class ClickToMove : Sprite2D{ public override void _UnhandledInput(InputEvent @event) { if (@event is InputEventMouseButton { Pressed: true } click) { this.TweenPosition(click.Position, 1.2, Out.Back); } }}- Catch the click. Godot passes every mouse press that no UI control used to
_UnhandledInput. - Start the tween. Move this node to the click in 1.2 seconds;
Out.Backovershoots, then settles. The call returns at once, and the tween plays over the next frames. C# needsthis.to call an extension method on the node itself.
Other properties work the same way, such as TweenScale, TweenRotation, and TweenModulate. 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.