C#Beta
Anatomy of a Tween
Each tween is backed by a definition, describing where it goes, when it plays, how it paces, and what runs along the way. Every field has a default, so a definition sets only what it changes.
Unless you specified global usings, assume using tweens.gd; everywhere.
var arrive = new Tweens.Position2D((400, 180), 0.6, Out.Cubic){ Delay = 0.1, Ease = In.Linear | Out.Cubic, OnEnd = _ => GD.Print("Arrived"),};
var oopsVeryLate = arrive with { DeltaDelay = 2.0 };
var movement = sprite.Tween(oopsVeryLate);
await movement.End;- Define. A definition struct has optional constructor arguments for endpoint, timing, easing, and delay.
- Initialize. Set or mutate specifics you want when you’re getting into the weeds during production.
- React. Callbacks run at fixed points of each playback.
- Tweak. Last-minute modifications close to the action.
- Start. Starting playback snapshots the definition and returns a handle.
- Await.
Endcompletes with the reason playback ended.
Parameters
Section titled “Parameters”Tween definitions may consist of dozens of parameters. It’s dangerous to go alone, but IntelliSense has got your back. Usually, you’ll find yourself relying on at most three or four of these, but there might be different needs for each tween.
Endpoints
Section titled “Endpoints”Where the motion starts and ends.
From= nullStart value. Leave it out to read the property’s current value as the tween starts.
To= nullEnd value. Leave it out to end at the value the property had at start.
By= nullAn offset instead of
To. It adds on top of other changes to the property.
Timing
Section titled “Timing”When the motion plays, and how often.
Duration= 0Seconds per leg. Zero completes on the first update.
Delay= 0Wait before the first leg. A negative delay starts partway in.
Offset= 0Start this far into the first forward leg. The delay still comes first.
Repeats= 0Cycles after the first.
TweenOptions.Infiniterepeats until cancelled.Ping= falsePong Each cycle runs forward, then back to its start.
Wait at the far end before returning.
Wait between cycles, never after the last.
Fill= RetainFinalValueWhat the property shows during the delay and after the end. Dashed: the alternatives.
Easing
Section titled “Easing”How the motion paces between its endpoints. The easing playground has a smorgasbord of curves!
Ease= LinearThe curve: an In, an Out, or one of each joined with
|.Blend= MakimaType How a mixed pair joins in the middle.
Blend= 0.1Width of the join window, from 0 to 1.
Skew= 0.5Where the forward leg hands over from In to Out.
Weks= 0.5Where the ping-pong return hands over: skew, backwards.
Ease= nullFunction Your own function of progress. It replaces
Ease.Curve= nullA Godot
Curvesampled over progress. It replacesEase.
Color interpolation
Section titled “Color interpolation”Whole-color interpolation coordinates, alpha handling, and the target API’s RGB encoding. These settings do not affect scalar alpha channels.
Color= ColorSpace.OklabSpace Working coordinates for whole-color interpolation.
Alpha= AlphaMode.PremultipliedMode Premultiply working coordinates by alpha before interpolation.
Color= ColorEncoding.SrgbEncoding RGB encoding accepted and returned at the Godot API boundary.
Callbacks
Section titled “Callbacks”Run code at fixed points of each playback.
Runs at activation, after the start value is captured.
Runs once, when the delay ends and the motion begins.
Runs after each write.
Runs on natural completion.
Runs when playback stops early: cancelled, target freed, owner exited, or runner disposed.
Runs last, regardless of how tween playback actually ended.
Suppress= falseCallbacks When Target Invalid Skips
OnEnd,OnCancel, andOnFinallyonce the target or owner is gone.
Variations
Section titled “Variations”When a tween starts, each value becomes factor × value + delta. Variations shows them in use.
Factor= 1From Multiplies
From.Delta= nullFrom Then adds to
From.Factor= 1To Multiplies
To.Delta= nullTo Then adds to
To.Factor= 1By Multiplies
By.Delta= nullBy Then adds to
By.Multiplies
Duration.Then adds seconds to
Duration.Factor= 1Delay Multiplies
Delay.Delta= 0Delay Then adds seconds to
Delay, as in a per-start stagger.
Options holds every timing and easing field as one TweenOptions value. Each name links to its row in the reference.
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.