[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KRER5G7EQWKGAFN8QJKQ69":3,"skill-same:01M6KRER5G7EQWKGAFN8QJKQ69":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6KRER5G7EQWKGAFN8QJKQ69","tween-animation",null,"Use when implementing tweens — property animation, method tweening, chaining, parallel sequences, easing, and common UI\u002Fgameplay motion recipes","jame581\u002FGodotPrompter","jame581","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21112138?v=4","01M6KR3KEQ9Z30WVJRR2E2ZVXE","Jan Mesarč","01M6KR3KJVRMPDSMASQPBCBVK3",964,"MIT","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31],"Animation","tween animation","ui","chaining","parallel","common","use","gameplay","motion","recipes","implementing","when","sequences","2026-11-10 10:12:30",false,"---\nname: tween-animation\ndescription: Use when implementing tweens — property animation, method tweening, chaining, parallel sequences, easing, and common UI\u002Fgameplay motion recipes\n---\n\n# Tweens in Godot 4.3+\n\nAll examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.\n\n> **Related skills:** **animation-system** for AnimationPlayer\u002FAnimationTree (keyframe-based), **godot-ui** for UI transitions, **shader-basics** for tweening shader parameters, **camera-system** for camera shake and transitions, **math-essentials** for easing curves and interpolation math, **particles-vfx** for code-driven VFX timing and sequencing.\n\n---\n\n## 1. Core Concepts\n\n### Tween vs AnimationPlayer\n\n| Feature         | Tween (code-driven)                        | AnimationPlayer (data-driven)              |\n|-----------------|--------------------------------------------|--------------------------------------------|\n| Setup           | Code only — no editor needed               | Animation panel with keyframes             |\n| Best for        | Procedural motion, UI transitions, VFX     | Complex multi-track, artist-driven clips   |\n| Reusability     | Recreated per use — lightweight            | Saved as resources, reusable across scenes |\n| Blending        | No — one tween per property at a time      | Yes — AnimationTree supports blending      |\n| Method calls    | `tween_callback()` at any point            | Call Method tracks at keyframed times      |\n\n**Rule of thumb:** Use Tweens for one-off procedural animations (fade in, bounce, slide). Use AnimationPlayer for repeating, artist-tuned animations (walk cycle, attack sequence).\n\n### Creating a Tween\n\nTweens are created from any `Node` and auto-bind to it. When the node is freed, the tween stops automatically.\n\n```gdscript\n# Creates a tween bound to this node\nvar tween := create_tween()\ntween.tween_property(self, \"position\", Vector2(400, 300), 1.0)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(this, \"position\", new Vector2(400, 300), 1.0f);\n```\n\n> **Important:** Each call to `create_tween()` creates a new tween. Previous tweens on the same property are **not** automatically killed — they compete. Kill old tweens before creating new ones on the same property if you don't want conflicts.\n\n---\n\n## 2. Tweener Types\n\n### tween_property() — Animate any property\n\n```gdscript\nvar tween := create_tween()\n# Animate position over 0.5 seconds\ntween.tween_property($Sprite2D, \"position\", Vector2(200, 100), 0.5)\n# Animate modulate alpha (fade out)\ntween.tween_property($Sprite2D, \"modulate:a\", 0.0, 0.3)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(GetNode(\"Sprite2D\"), \"position\", new Vector2(200, 100), 0.5);\ntween.TweenProperty(GetNode(\"Sprite2D\"), \"modulate:a\", 0.0f, 0.3);\n```\n\n**Sub-property access:** Use `:` to target individual components — `\"position:x\"`, `\"modulate:a\"`, `\"scale:y\"`.\n\n### tween_callback() — Call a method at a point in the sequence\n\n```gdscript\nvar tween := create_tween()\ntween.tween_property(self, \"position\", Vector2.ZERO, 0.5)\ntween.tween_callback(func(): print(\"Arrived!\"))\ntween.tween_callback(queue_free)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(this, \"position\", Vector2.Zero, 0.5f);\ntween.TweenCallback(Callable.From(() => GD.Print(\"Arrived!\")));\ntween.TweenCallback(Callable.From(QueueFree));\n```\n\n### tween_interval() — Wait\u002Fdelay between steps\n\n```gdscript\nvar tween := create_tween()\ntween.tween_property(self, \"modulate:a\", 0.0, 0.3)  # fade out\ntween.tween_interval(1.0)                             # wait 1 second\ntween.tween_property(self, \"modulate:a\", 1.0, 0.3)  # fade back in\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(this, \"modulate:a\", 0.0f, 0.3);\ntween.TweenInterval(1.0f);\ntween.TweenProperty(this, \"modulate:a\", 1.0f, 0.3);\n```\n\n### tween_method() — Animate a custom method with interpolated values\n\n```gdscript\n# Animate a method that receives interpolated float values\nfunc _ready() -> void:\n    var tween := create_tween()\n    tween.tween_method(_set_health_bar, 100.0, 0.0, 2.0)\n\nfunc _set_health_bar(value: float) -> void:\n    $HealthBar.value = value\n    $HealthLabel.text = \"%d%%\" % int(value)\n```\n\n```csharp\npublic override void _Ready()\n{\n    var tween = CreateTween();\n    tween.TweenMethod(Callable.From\u003Cfloat>(SetHealthBar), 100.0f, 0.0f, 2.0f);\n}\n\nprivate void SetHealthBar(float value)\n{\n    GetNode\u003CProgressBar>(\"HealthBar\").Value = value;\n    GetNode\u003CLabel>(\"HealthLabel\").Text = $\"{(int)value}%\";\n}\n```\n\n---\n\n## 3. Sequencing — Chain vs Parallel\n\n### Sequential (Default)\n\nBy default, tweeners run **sequentially** — each waits for the previous to finish.\n\n```gdscript\nvar tween := create_tween()\ntween.tween_property(self, \"position:x\", 300.0, 0.5)   # Step 1\ntween.tween_property(self, \"position:y\", 200.0, 0.5)   # Step 2 (after Step 1)\ntween.tween_property(self, \"rotation\", PI, 0.3)         # Step 3 (after Step 2)\n```\n\n### Parallel — Run tweeners simultaneously\n\n#### Option 1: `set_parallel(true)` — All tweeners run at once\n\n```gdscript\nvar tween := create_tween().set_parallel(true)\ntween.tween_property(self, \"position\", Vector2(300, 200), 0.5)\ntween.tween_property(self, \"rotation\", PI, 0.5)\ntween.tween_property(self, \"modulate:a\", 0.5, 0.5)\n```\n\n```csharp\nvar tween = CreateTween().SetParallel(true);\ntween.TweenProperty(this, \"position\", new Vector2(300, 200), 0.5f);\ntween.TweenProperty(this, \"rotation\", Mathf.Pi, 0.5f);\ntween.TweenProperty(this, \"modulate:a\", 0.5f, 0.5f);\n```\n\n#### Option 2: `chain()` — Switch back to sequential mid-tween\n\n```gdscript\nvar tween := create_tween().set_parallel(true)\n# These two run at the same time\ntween.tween_property(self, \"position\", Vector2(300, 200), 0.5)\ntween.tween_property(self, \"scale\", Vector2(2, 2), 0.5)\n# Switch back to sequential for the next step\ntween.chain().tween_property(self, \"modulate:a\", 0.0, 0.3)\ntween.tween_callback(queue_free)\n```\n\n```csharp\nvar tween = CreateTween().SetParallel(true);\ntween.TweenProperty(this, \"position\", new Vector2(300, 200), 0.5f);\ntween.TweenProperty(this, \"scale\", new Vector2(2, 2), 0.5f);\ntween.Chain().TweenProperty(this, \"modulate:a\", 0.0f, 0.3f);\ntween.TweenCallback(Callable.From(QueueFree));\n```\n\n#### Option 3: `parallel()` — Make the next tweener parallel with the previous\n\n```gdscript\nvar tween := create_tween()\ntween.tween_property(self, \"position\", Vector2(300, 200), 0.5)\n# This runs at the same time as position, not after\ntween.parallel().tween_property(self, \"rotation\", PI, 0.5)\n# This runs after both finish (back to sequential)\ntween.tween_callback(func(): print(\"done\"))\n```\n\n---\n\n## 4. Easing & Transitions\n\n### Setting Easing\n\n```gdscript\nvar tween := create_tween()\n# Set defaults for the entire tween\ntween.set_trans(Tween.TRANS_CUBIC).set_ease(Tween.EASE_OUT)\ntween.tween_property(self, \"position\", Vector2(400, 300), 0.6)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);\ntween.TweenProperty(this, \"position\", new Vector2(400, 300), 0.6f);\n```\n\n### Per-Tweener Override\n\n```gdscript\nvar tween := create_tween()\n# This tweener uses bounce, overriding the tween default\ntween.tween_property(self, \"position:y\", 0.0, 0.5) \\\n    .set_trans(Tween.TRANS_BOUNCE).set_ease(Tween.EASE_OUT)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(this, \"position:y\", 0.0f, 0.5f)\n    .SetTrans(Tween.TransitionType.Bounce)\n    .SetEase(Tween.EaseType.Out);\n```\n\n### Transition Types\n\n| Transition       | Character                              | Common Use                          |\n|------------------|----------------------------------------|-------------------------------------|\n| `TRANS_LINEAR`   | Constant speed                         | Progress bars, timers               |\n| `TRANS_SINE`     | Gentle acceleration                    | Subtle UI animations                |\n| `TRANS_QUAD`     | Moderate curve                         | General movement                    |\n| `TRANS_CUBIC`    | Smooth curve                           | Most UI transitions                 |\n| `TRANS_QUART`    | Strong curve                           | Dramatic entrances                  |\n| `TRANS_QUINT`    | Very strong curve                      | Emphasis effects                    |\n| `TRANS_EXPO`     | Exponential — sharp start\u002Fstop         | Snap-to-position                    |\n| `TRANS_CIRC`     | Circular — smooth deceleration         | Natural motion                      |\n| `TRANS_BACK`     | Overshoots target slightly             | Bouncy UI buttons                   |\n| `TRANS_ELASTIC`  | Spring oscillation                     | Playful\u002Fcartoon effects             |\n| `TRANS_BOUNCE`   | Bounces at the end                     | Dropping objects, landing           |\n\n### Ease Types\n\n| Ease          | Behavior                                |\n|---------------|-----------------------------------------|\n| `EASE_IN`     | Slow start, fast end                    |\n| `EASE_OUT`    | Fast start, slow end (most natural)     |\n| `EASE_IN_OUT` | Slow at both ends                       |\n| `EASE_OUT_IN` | Fast at both ends (rarely used)         |\n\n> **Most common combo:** `TRANS_CUBIC` + `EASE_OUT` for natural-feeling UI transitions. `TRANS_BACK` + `EASE_OUT` for playful bounce-in effects.\n\n---\n\n## 5. PropertyTweener Modifiers\n\nEach `tween_property()` call returns a `PropertyTweener` you can chain modifiers on: `.from(value)` for a custom start, `.from_current()` to capture current value, `.as_relative()` to add (not replace), `.set_delay(seconds)` to delay this tweener's start.\n\n> See [references\u002Fproperty-tweener-modifiers.md](references\u002Fproperty-tweener-modifiers.md) for full code examples of each modifier.\n\n---\n\n## 6. Looping and Signals\n\n`tween.set_loops(N)` repeats N times (`0` = infinite). Signals: `finished` (whole tween done), `step_finished(idx)` (one step done), `loop_finished(loop_count)` (one full cycle done; not emitted after the last loop, where `finished` fires).\n\n> See [references\u002Flooping-and-signals.md](references\u002Flooping-and-signals.md) for loop-count semantics and signal wiring.\n\n---\n\n## 7. Tween Lifecycle\n\nTweens are owned by their host SceneTree. Kill running tweens with `tween.kill()` before starting a new one to avoid stacking. Use `set_pause_mode`, `set_speed_scale` and (Godot 4.4+) `set_ignore_time_scale` for runtime control.\n\n> See [references\u002Flifecycle.md](references\u002Flifecycle.md) for kill\u002Freplace patterns, pause modes, speed scale, ignore-time-scale.\n\n### has_tweeners() (Godot 4.7+)\n\n`Tween.has_tweeners()` (const) returns `true` if any `Tweener` has been added to the tween and the tween is valid — useful when tweeners are appended dynamically and the tween can end up empty. Killing an empty tween before it starts prevents errors.\n\n```gdscript\nvar tween := create_tween()\n_add_intro_steps(tween)  # may append zero tweeners\nif not tween.has_tweeners():\n    tween.kill()\n```\n\n```csharp\nvar tween = CreateTween();\nAddIntroSteps(tween); \u002F\u002F may append zero tweeners\nif (!tween.HasTweeners())\n    tween.Kill();\n```\n\n---\n\n## 8. Common Recipes\n\nThe patterns most projects need: fade in\u002Fout, UI panel slide in\u002Fout, button press bounce, damage number popup, pulsing\u002Fbreathing effect, screen shake, shader parameter animation.\n\n> See [references\u002Fcommon-recipes.md](references\u002Fcommon-recipes.md) for ready-to-use code for each recipe.\n\n---\n\n## 9. Common Pitfalls\n\n| Symptom                             | Cause                                            | Fix                                                                |\n|-------------------------------------|---------------------------------------------------|--------------------------------------------------------------------|\n| Tween jumps or jitters              | Multiple tweens competing on the same property    | Kill the old tween before creating a new one                       |\n| Tween does nothing                  | Node was freed before tween finished              | Check `is_valid()` or use `tween_callback` instead of `await`      |\n| Tween runs or stops during pause    | Default `TWEEN_PAUSE_BOUND` follows the bound node's `process_mode` | `TWEEN_PAUSE_STOP` to always pause, `TWEEN_PAUSE_PROCESS` to keep running |\n| `from()` value ignored              | The `from()` value is applied only when that tweener starts | Set the property to the start value first if it must show earlier |\n| Tween doesn't loop smoothly         | End value doesn't match start for seamless loop   | Use `as_relative()` for rotation, or match start\u002Fend values        |\n| Relative tween drifts over loops    | `as_relative()` accumulates each loop             | Use absolute values for looping; relative for one-shot moves       |\n| Callback fires at wrong time        | Callback added to parallel section                | Use `chain()` to switch back to sequential before the callback     |\n| Tween property path not found       | Typo or wrong path format                         | Use `\"property:component\"` — e.g., `\"position:x\"`, `\"modulate:a\"` |\n| Tween faster\u002Fslower than expected   | `Engine.time_scale` affects tween                 | Use `set_ignore_time_scale()` (4.4+) for UI tweens during slow-mo  |\n\n---\n\n## 10. Implementation Checklist\n\n- [ ] Old tweens are killed before creating new ones on the same property\n- [ ] Tween references are stored in variables when they need to be killed later\n- [ ] Easing is set (`TRANS_CUBIC` + `EASE_OUT` for natural motion, not default `TRANS_LINEAR`)\n- [ ] `set_parallel(true)` is used when multiple properties should animate simultaneously\n- [ ] `chain()` is used to switch back to sequential after parallel sections\n- [ ] `from()` or `from_current()` is used when the start value matters (not just the end value)\n- [ ] `as_relative()` is used for incremental movement instead of computing absolute targets\n- [ ] Looping tweens use `set_loops()` — not manual recreation\n- [ ] Tweens that must run during pause use `set_pause_mode(TWEEN_PAUSE_PROCESS)`\n- [ ] `tween_callback(queue_free)` is used at the end of fire-and-forget sequences (damage numbers, particles)\n","# Tweens in Godot 4.3+\n\nAll examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.\n\n> **Related skills:** **animation-system** for AnimationPlayer\u002FAnimationTree (keyframe-based), **godot-ui** for UI transitions, **shader-basics** for tweening shader parameters, **camera-system** for camera shake and transitions, **math-essentials** for easing curves and interpolation math, **particles-vfx** for code-driven VFX timing and sequencing.\n\n---\n\n## 1. Core Concepts\n\n### Tween vs AnimationPlayer\n\n| Feature         | Tween (code-driven)                        | AnimationPlayer (data-driven)              |\n|-----------------|--------------------------------------------|--------------------------------------------|\n| Setup           | Code only — no editor needed               | Animation panel with keyframes             |\n| Best for        | Procedural motion, UI transitions, VFX     | Complex multi-track, artist-driven clips   |\n| Reusability     | Recreated per use — lightweight            | Saved as resources, reusable across scenes |\n| Blending        | No — one tween per property at a time      | Yes — AnimationTree supports blending      |\n| Method calls    | `tween_callback()` at any point            | Call Method tracks at keyframed times      |\n\n**Rule of thumb:** Use Tweens for one-off procedural animations (fade in, bounce, slide). Use AnimationPlayer for repeating, artist-tuned animations (walk cycle, attack sequence).\n\n### Creating a Tween\n\nTweens are created from any `Node` and auto-bind to it. When the node is freed, the tween stops automatically.\n\n```gdscript\n# Creates a tween bound to this node\nvar tween := create_tween()\ntween.tween_property(self, \"position\", Vector2(400, 300), 1.0)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(this, \"position\", new Vector2(400, 300), 1.0f);\n```\n\n> **Important:** Each call to `create_tween()` creates a new tween. Previous tweens on the same property are **not** automatically killed — they compete. Kill old tweens before creating new ones on the same property if you don't want conflicts.\n\n---\n\n## 2. Tweener Types\n\n### tween_property() — Animate any property\n\n```gdscript\nvar tween := create_tween()\n# Animate position over 0.5 seconds\ntween.tween_property($Sprite2D, \"position\", Vector2(200, 100), 0.5)\n# Animate modulate alpha (fade out)\ntween.tween_property($Sprite2D, \"modulate:a\", 0.0, 0.3)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(GetNode(\"Sprite2D\"), \"position\", new Vector2(200, 100), 0.5);\ntween.TweenProperty(GetNode(\"Sprite2D\"), \"modulate:a\", 0.0f, 0.3);\n```\n\n**Sub-property access:** Use `:` to target individual components — `\"position:x\"`, `\"modulate:a\"`, `\"scale:y\"`.\n\n### tween_callback() — Call a method at a point in the sequence\n\n```gdscript\nvar tween := create_tween()\ntween.tween_property(self, \"position\", Vector2.ZERO, 0.5)\ntween.tween_callback(func(): print(\"Arrived!\"))\ntween.tween_callback(queue_free)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(this, \"position\", Vector2.Zero, 0.5f);\ntween.TweenCallback(Callable.From(() => GD.Print(\"Arrived!\")));\ntween.TweenCallback(Callable.From(QueueFree));\n```\n\n### tween_interval() — Wait\u002Fdelay between steps\n\n```gdscript\nvar tween := create_tween()\ntween.tween_property(self, \"modulate:a\", 0.0, 0.3)  # fade out\ntween.tween_interval(1.0)                             # wait 1 second\ntween.tween_property(self, \"modulate:a\", 1.0, 0.3)  # fade back in\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(this, \"modulate:a\", 0.0f, 0.3);\ntween.TweenInterval(1.0f);\ntween.TweenProperty(this, \"modulate:a\", 1.0f, 0.3);\n```\n\n### tween_method() — Animate a custom method with interpolated values\n\n```gdscript\n# Animate a method that receives interpolated float values\nfunc _ready() -> void:\n    var tween := create_tween()\n    tween.tween_method(_set_health_bar, 100.0, 0.0, 2.0)\n\nfunc _set_health_bar(value: float) -> void:\n    $HealthBar.value = value\n    $HealthLabel.text = \"%d%%\" % int(value)\n```\n\n```csharp\npublic override void _Ready()\n{\n    var tween = CreateTween();\n    tween.TweenMethod(Callable.From\u003Cfloat>(SetHealthBar), 100.0f, 0.0f, 2.0f);\n}\n\nprivate void SetHealthBar(float value)\n{\n    GetNode\u003CProgressBar>(\"HealthBar\").Value = value;\n    GetNode\u003CLabel>(\"HealthLabel\").Text = $\"{(int)value}%\";\n}\n```\n\n---\n\n## 3. Sequencing — Chain vs Parallel\n\n### Sequential (Default)\n\nBy default, tweeners run **sequentially** — each waits for the previous to finish.\n\n```gdscript\nvar tween := create_tween()\ntween.tween_property(self, \"position:x\", 300.0, 0.5)   # Step 1\ntween.tween_property(self, \"position:y\", 200.0, 0.5)   # Step 2 (after Step 1)\ntween.tween_property(self, \"rotation\", PI, 0.3)         # Step 3 (after Step 2)\n```\n\n### Parallel — Run tweeners simultaneously\n\n#### Option 1: `set_parallel(true)` — All tweeners run at once\n\n```gdscript\nvar tween := create_tween().set_parallel(true)\ntween.tween_property(self, \"position\", Vector2(300, 200), 0.5)\ntween.tween_property(self, \"rotation\", PI, 0.5)\ntween.tween_property(self, \"modulate:a\", 0.5, 0.5)\n```\n\n```csharp\nvar tween = CreateTween().SetParallel(true);\ntween.TweenProperty(this, \"position\", new Vector2(300, 200), 0.5f);\ntween.TweenProperty(this, \"rotation\", Mathf.Pi, 0.5f);\ntween.TweenProperty(this, \"modulate:a\", 0.5f, 0.5f);\n```\n\n#### Option 2: `chain()` — Switch back to sequential mid-tween\n\n```gdscript\nvar tween := create_tween().set_parallel(true)\n# These two run at the same time\ntween.tween_property(self, \"position\", Vector2(300, 200), 0.5)\ntween.tween_property(self, \"scale\", Vector2(2, 2), 0.5)\n# Switch back to sequential for the next step\ntween.chain().tween_property(self, \"modulate:a\", 0.0, 0.3)\ntween.tween_callback(queue_free)\n```\n\n```csharp\nvar tween = CreateTween().SetParallel(true);\ntween.TweenProperty(this, \"position\", new Vector2(300, 200), 0.5f);\ntween.TweenProperty(this, \"scale\", new Vector2(2, 2), 0.5f);\ntween.Chain().TweenProperty(this, \"modulate:a\", 0.0f, 0.3f);\ntween.TweenCallback(Callable.From(QueueFree));\n```\n\n#### Option 3: `parallel()` — Make the next tweener parallel with the previous\n\n```gdscript\nvar tween := create_tween()\ntween.tween_property(self, \"position\", Vector2(300, 200), 0.5)\n# This runs at the same time as position, not after\ntween.parallel().tween_property(self, \"rotation\", PI, 0.5)\n# This runs after both finish (back to sequential)\ntween.tween_callback(func(): print(\"done\"))\n```\n\n---\n\n## 4. Easing & Transitions\n\n### Setting Easing\n\n```gdscript\nvar tween := create_tween()\n# Set defaults for the entire tween\ntween.set_trans(Tween.TRANS_CUBIC).set_ease(Tween.EASE_OUT)\ntween.tween_property(self, \"position\", Vector2(400, 300), 0.6)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);\ntween.TweenProperty(this, \"position\", new Vector2(400, 300), 0.6f);\n```\n\n### Per-Tweener Override\n\n```gdscript\nvar tween := create_tween()\n# This tweener uses bounce, overriding the tween default\ntween.tween_property(self, \"position:y\", 0.0, 0.5) \\\n    .set_trans(Tween.TRANS_BOUNCE).set_ease(Tween.EASE_OUT)\n```\n\n```csharp\nvar tween = CreateTween();\ntween.TweenProperty(this, \"position:y\", 0.0f, 0.5f)\n    .SetTrans(Tween.TransitionType.Bounce)\n    .SetEase(Tween.EaseType.Out);\n```\n\n### Transition Types\n\n| Transition       | Character                              | Common Use                          |\n|------------------|----------------------------------------|-------------------------------------|\n| `TRANS_LINEAR`   | Constant speed                         | Progress bars, timers               |\n| `TRANS_SINE`     | Gentle acceleration                    | Subtle UI animations                |\n| `TRANS_QUAD`     | Moderate curve                         | General movement                    |\n| `TRANS_CUBIC`    | Smooth curve                           | Most UI transitions                 |\n| `TRANS_QUART`    | Strong curve                           | Dramatic entrances                  |\n| `TRANS_QUINT`    | Very strong curve                      | Emphasis effects                    |\n| `TRANS_EXPO`     | Exponential — sharp start\u002Fstop         | Snap-to-position                    |\n| `TRANS_CIRC`     | Circular — smooth deceleration         | Natural motion                      |\n| `TRANS_BACK`     | Overshoots target slightly             | Bouncy UI buttons                   |\n| `TRANS_ELASTIC`  | Spring oscillation                     | Playful\u002Fcartoon effects             |\n| `TRANS_BOUNCE`   | Bounces at the end                     | Dropping objects, landing           |\n\n### Ease Types\n\n| Ease          | Behavior                                |\n|---------------|-----------------------------------------|\n| `EASE_IN`     | Slow start, fast end                    |\n| `EASE_OUT`    | Fast start, slow end (most natural)     |\n| `EASE_IN_OUT` | Slow at both ends                       |\n| `EASE_OUT_IN` | Fast at both ends (rarely used)         |\n\n> **Most common combo:** `TRANS_CUBIC` + `EASE_OUT` for natural-feeling UI transitions. `TRANS_BACK` + `EASE_OUT` for playful bounce-in effects.\n\n---\n\n## 5. PropertyTweener Modifiers\n\nEach `tween_property()` call returns a `PropertyTweener` you can chain modifiers on: `.from(value)` for a custom start, `.from_current()` to capture current value, `.as_relative()` to add (not replace), `.set_delay(seconds)` to delay this tweener's start.\n\n> See [references\u002Fproperty-tweener-modifiers.md](references\u002Fproperty-tweener-modifiers.md) for full code examples of each modifier.\n\n---\n\n## 6. Looping and Signals\n\n`tween.set_loops(N)` repeats N times (`0` = infinite). Signals: `finished` (whole tween done), `step_finished(idx)` (one step done), `loop_finished(loop_count)` (one full cycle done; not emitted after the last loop, where `finished` fires).\n\n> See [references\u002Flooping-and-signals.md](references\u002Flooping-and-signals.md) for loop-count semantics and signal wiring.\n\n---\n\n## 7. Tween Lifecycle\n\nTweens are owned by their host SceneTree. Kill running tweens with `tween.kill()` before starting a new one to avoid stacking. Use `set_pause_mode`, `set_speed_scale` and (Godot 4.4+) `set_ignore_time_scale` for runtime control.\n\n> See [references\u002Flifecycle.md](references\u002Flifecycle.md) for kill\u002Freplace patterns, pause modes, speed scale, ignore-time-scale.\n\n### has_tweeners() (Godot 4.7+)\n\n`Tween.has_tweeners()` (const) returns `true` if any `Tweener` has been added to the tween and the tween is valid — useful when tweeners are appended dynamically and the tween can end up empty. Killing an empty tween before it starts prevents errors.\n\n```gdscript\nvar tween := create_tween()\n_add_intro_steps(tween)  # may append zero tweeners\nif not tween.has_tweeners():\n    tween.kill()\n```\n\n```csharp\nvar tween = CreateTween();\nAddIntroSteps(tween); \u002F\u002F may append zero tweeners\nif (!tween.HasTweeners())\n    tween.Kill();\n```\n\n---\n\n## 8. Common Recipes\n\nThe patterns most projects need: fade in\u002Fout, UI panel slide in\u002Fout, button press bounce, damage number popup, pulsing\u002Fbreathing effect, screen shake, shader parameter animation.\n\n> See [references\u002Fcommon-recipes.md](references\u002Fcommon-recipes.md) for ready-to-use code for each recipe.\n\n---\n\n## 9. Common Pitfalls\n\n| Symptom                             | Cause                                            | Fix                                                                |\n|-------------------------------------|---------------------------------------------------|--------------------------------------------------------------------|\n| Tween jumps or jitters              | Multiple tweens competing on the same property    | Kill the old tween before creating a new one                       |\n| Tween does nothing                  | Node was freed before tween finished              | Check `is_valid()` or use `tween_callback` instead of `await`      |\n| Tween runs or stops during pause    | Default `TWEEN_PAUSE_BOUND` follows the bound node's `process_mode` | `TWEEN_PAUSE_STOP` to always pause, `TWEEN_PAUSE_PROCESS` to keep running |\n| `from()` value ignored              | The `from()` value is applied only when that tweener starts | Set the property to the start value first if it must show earlier |\n| Tween doesn't loop smoothly         | End value doesn't match start for seamless loop   | Use `as_relative()` for rotation, or match start\u002Fend values        |\n| Relative tween drifts over loops    | `as_relative()` accumulates each loop             | Use absolute values for looping; relative for one-shot moves       |\n| Callback fires at wrong time        | Callback added to parallel section                | Use `chain()` to switch back to sequential before the callback     |\n| Tween property path not found       | Typo or wrong path format                         | Use `\"property:component\"` — e.g., `\"position:x\"`, `\"modulate:a\"` |\n| Tween faster\u002Fslower than expected   | `Engine.time_scale` affects tween                 | Use `set_ignore_time_scale()` (4.4+) for UI tweens during slow-mo  |\n\n---\n\n## 10. Implementation Checklist\n\n- [ ] Old tweens are killed before creating new ones on the same property\n- [ ] Tween references are stored in variables when they need to be killed later\n- [ ] Easing is set (`TRANS_CUBIC` + `EASE_OUT` for natural motion, not default `TRANS_LINEAR`)\n- [ ] `set_parallel(true)` is used when multiple properties should animate simultaneously\n- [ ] `chain()` is used to switch back to sequential after parallel sections\n- [ ] `from()` or `from_current()` is used when the start value matters (not just the end value)\n- [ ] `as_relative()` is used for incremental movement instead of computing absolute targets\n- [ ] Looping tweens use `set_loops()` — not manual recreation\n- [ ] Tweens that must run during pause use `set_pause_mode(TWEEN_PAUSE_PROCESS)`\n- [ ] `tween_callback(queue_free)` is used at the end of fire-and-forget sequences (damage numbers, particles)\n",{"name":5,"description":7},"master","d7b26cdb5fae14d4ef7b713c5bf259395e75c3c6","skills\u002Ftween-animation",63,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter","https:\u002F\u002Fgithub.com\u002Fjame581","https:\u002F\u002Fjanmesarc.online\u002F","Software engineer. My biggest passion is game development.","2026-11-14 20:45:49",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add jame581\u002FGodotPrompter --skill tween-animation",{"tool":52,"command":53},"bunx","bunx skills add jame581\u002FGodotPrompter --skill tween-animation",{"tool":55,"command":56},"pnpm","pnpm dlx skills add jame581\u002FGodotPrompter --skill tween-animation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002FSKILL.md",true,[60,66,70,74],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fcommon-recipes.md","REFERENCE","参考文档",5726,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002Freferences\u002Fcommon-recipes.md",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Flifecycle.md",1870,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002Freferences\u002Flifecycle.md",{"path":71,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Flooping-and-signals.md",1789,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002Freferences\u002Flooping-and-signals.md",{"path":75,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fproperty-tweener-modifiers.md",1632,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002Freferences\u002Fproperty-tweener-modifiers.md",[79,99,120,145,161,177],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":32},"01M6KRFE5BR2PSD08ZKDAS66R7","xr-development","Use when building VR\u002FAR\u002FXR applications — OpenXR setup, XROrigin3D, hand tracking, controllers, passthrough, and Meta Quest deployment in Godot 4.3+","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fxr-development\u002FSKILL.md",[],[86,87,30,88,89,90,91,92,93,94,95,25,96,97,98],"xr development","development","deployment","godot","vr","setup","tracking","godot 4","ar","hand","Meta","applications","quest",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":32},"01M6KRF8GZTG1TAS506MFBSGFC","web-services","Use when a Godot game calls a web server — HTTPRequest, downloads, REST\u002FJSON APIs, auth headers, WebSocketPeer clients, TLS, retries, and keeping secrets out of the build. Not for game networking\u002FRPCs (multiplayer-basics) or browser export (web-export)","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-services\u002FSKILL.md",[],[106,107,108,109,110,111,112,113,25,30,89,114,115,116,117,118,119],"web services","web","services","tls","retries","calling","auth","downloads","clients","headers","secrets","json","build","REST",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":32},"01M6KRF38Q4WSKAYFS56PG87T0","web-export","Use when shipping a Godot game to the browser — Web export preset options, threads vs no-threads and COOP\u002FCOEP headers, hosting on itch.io or your own server, PWA, JavaScriptBridge, user:\u002F\u002F persistence, audio and input limits, and load size","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-export\u002FSKILL.md",[],[107,127,128,129,30,130,131,132,133,115,134,135,136,137,138,139,140,141,25,142,143,144],"export","web export","threads","limits","shipping","size","options","server","hosting","input","preset","browser","game","io","load","pwa","Audio","Coop",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":32},"01M6KREYFETEBH62ZTN6EZH2X3","using-godot-prompter","Bootstrap skill — establishes how to find and use GodotPrompter skills, with platform-specific tool mapping","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fusing-godot-prompter\u002FSKILL.md",[],[89,152,153,154,155,25,156,157,158,159,160],"using godot prompter","bootstrap","find","with","tool","platform","mapping","how","how to",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":32},"01M6KREKGCQMVDV8WX7HWX8BZG","state-machine","Use when building a state machine or refactoring logic into one — enum, node, and resource-based FSM patterns with trade-offs. Not for adding states to an existing one","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fstate-machine\u002FSKILL.md",[],[168,169,170,171,172,173,155,25,29,174,175,30,89,176],"machine","state machine","state","fsm","state machines","trade","trade-offs","node","patterns",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":32},"01M6KREE370Y80QK838PCRBA0S","shader-basics","Use when implementing shaders — Godot shader language, visual shaders, common visual recipes, and post-processing effects","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fshader-basics\u002FSKILL.md",[],[184,185,186,28,30,89,187,188,189,190,24,191,192,25,29,193],"shader","shader basics","basics","language","post-processing","shaders","post","visual","effects","processing"]