Describe
- Definitions:
Tweens.*andTweenOptions - Endpoints & variations:
From,To,By, factors - Timing:
Duration,Repeats,FillMode - Callbacks:
OnAddthroughOnFinally
C#Beta
A definition describes a motion, starting it returns a handle, and the handle controls that one playback. These pages list every member of each, with the exact rules the guides leave out. Anatomy of a Tween draws every field.
Examples use using Godot; and using tweens.gd;, which also covers definitions such as Tweens.Position2D.
Describe
Tweens.* and TweenOptionsFrom, To, By, factorsDuration, Repeats, FillModeOnAdd through OnFinallyShape
Play
Tween(), PlaybackOptionsTweenInstance, ReasonExtend
TweenDefinitionTweenSchedulerBoth blink a sprite out three times:
var tween = sprite.CreateTween().SetLoops(3);tween.TweenProperty(sprite, "modulate:a", 0f, 0.2).From(1f);var blink = new Tweens.ModulateAlpha(0, 0.2) { From = 1, Repeats = 2 };
sprite.Tween(blink);Godot’s Tween |
tweens.gd |
|---|---|
TweenProperty(...) |
A definition, started with node.Tween(definition) |
From(value), AsRelative() |
From, By |
SetTrans(...), SetEase(...) |
One Ease, such as Out.Cubic |
SetDelay(seconds) |
Delay |
SetLoops(count) |
Repeats, which counts cycles after the first: SetLoops(3) is Repeats = 2, and SetLoops() is TweenOptions.Infinite |
| A second tween back to the start | PingPong |
SetParallel(), Parallel() |
node.Tween(first, second), or Group.Of |
Tweeners in sequence, TweenInterval(seconds) |
node.Chain([...]), with a Delay on the next entry |
TweenCallback(...) |
A callback, such as OnEnd |
TweenMethod(...) |
Tweens.Float and the other callback values |
Finished signal |
await handle.End, which also resumes when playback stops early |
Pause(), Play(), Kill() |
Pause(), Resume(), Cancel() |
SetProcessMode, SetPauseMode, SetIgnoreTimeScale |
PlaybackOptions |
BindNode(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 GDScript core API for its entry points.
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.