Skip to content
tweens.gd

GDScriptBeta

Core API

A definition describes a motion, starting it returns a handle, and the handle controls that one playback. These pages list every field and member of each, with the exact rules the guides leave out. Anatomy of a Tween draws every field.

Examples use the global Tweens class in a node script, with targets inside the scene tree. The native types are global too: TweensGdDefinition, TweensGdHandle, TweensGdGroup, TweensGdChain, TweensGdPlaybackOptions, TweensGdScheduler, and TweensGdCancellation. Use these names in type annotations.

Shape

  • Easing: In, Out, BlendType, curves
  • Effects: punch, shake, and breathe

Both blink a sprite out three times:

Godot's Tween
var tween := sprite.create_tween().set_loops(3)
tween.tween_property(sprite, "modulate:a", 0.0, 0.2).from(1.0)
tweens.gd
var blink := Tweens.modulate_alpha(0.0, 0.2).with_from(1.0).with_repeats(2)
Tweens.play(sprite, blink)
Godot’s Tween tweens.gd
tween_property(...) A definition, started with Tweens.play(node, definition)
from(value), as_relative() from_value, by_value
set_trans(...), set_ease(...) One ease, such as Out.CUBIC
set_delay(seconds) delay
set_loops(count) repeats, which counts cycles after the first: set_loops(3) is repeats = 2, and set_loops() is Tweens.INFINITE
A second tween back to the start ping_pong
set_parallel(), parallel() Tweens.play_all(node, [...]), or Tweens.group()
Tweeners in sequence, tween_interval(seconds) Tweens.chain(node, [...]), with a delay on the next entry
tween_callback(...) A callback, such as on_end
tween_method(...) Tweens.value() and the other callback values
finished signal await handle.end, which also resumes when playback stops early
pause(), play(), kill() pause(), resume(), cancel()
set_process_mode, set_pause_mode, set_ignore_time_scale Tweens.playback_options()
bind_node(node) The node you start on, or a resource tween’s owner

Both implementations share their timing, easing, grouping, and lifetime rules, and shared fixtures test both. The differences come from the languages:

Area C# GDScript
Names PascalCase: From, To, By snake_case: from_value, to_value, by_value
Starts node.Tween(definition), node.Tween(a, b) Tweens.play(node, definition), Tweens.play_all(node, [a, b])
Definitions Immutable values, varied with with Mutable objects, varied with with_*() copies
Type checks Generic TweenInstance<TTarget, TValue>, checked by the compiler Target class and value type checked when playback starts
Failures Awaiting faults with an exception; Error holds it Awaiting end returns FAILED; error holds a message
Script errors Exceptions from callbacks and setters fault the tween Detected problems become FAILED; other errors stay Godot script errors
Integer values Saturate at 32-bit limits Saturate at signed 64-bit limits; shader integers stay 32-bit
Callbacks Synchronous Synchronous; await end from a separate coroutine instead of inside one

See the C# core API for its entry points, and compatibility for validated platforms.

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.