[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KR6HGM83EKNKB63YNK4TBC":3,"skill-same:01M6KR6HGM83EKNKB63YNK4TBC":107},{"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":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6KR6HGM83EKNKB63YNK4TBC","animation-system",null,"Use when implementing animations — AnimationPlayer, AnimationTree, blend trees, state machines, sprite animation, and code-driven animation","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\u002Fanimation-system\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"Animation","system","animation system","implementing","code","state machines","trees","use","sprite animation","state","animationtree","driven","when","animations","2026-11-10 10:12:30",false,"---\nname: animation-system\ndescription: Use when implementing animations — AnimationPlayer, AnimationTree, blend trees, state machines, sprite animation, and code-driven animation\n---\n\n# Animation System 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:** **state-machine** for gameplay state management, **player-controller** for movement that drives animation, **component-system** for reusable animation components, **2d-essentials** for TileMaps, parallax scrolling, 2D lights, and canvas layer organization, **3d-essentials** for AnimationTree and 3D animation blending, **shader-basics** for shader-driven hit flash and dissolve effects, **tween-animation** for code-driven motion alongside keyframe animation.\n\n---\n\n## 1. Core Concepts\n\n### AnimationPlayer vs AnimationTree\n\n| Node              | Use For                                  | Complexity | Notes                                              |\n|-------------------|------------------------------------------|------------|----------------------------------------------------|\n| `AnimationPlayer` | Simple playback, one-shot effects        | Low        | Play\u002Fstop\u002Fqueue individual clips directly          |\n| `AnimationTree`   | Blending, transitions, layered animation | Medium-High| State machines and blend trees for smooth transitions |\n\n**Rule of thumb:** Start with AnimationPlayer. Add AnimationTree when you need blending between animations (walk\u002Frun blend, directional movement, layered upper\u002Flower body).\n\n### Animation Workflow\n\n```\n1. Create AnimationPlayer node       → holds all animation clips\n2. Add tracks in the Animation panel → keyframe properties, methods, audio\n3. (Optional) Add AnimationTree      → blend\u002Ftransition logic\n4. Trigger from code                 → play(), travel(), set parameters\n```\n\n---\n\n## 2. AnimationPlayer Basics\n\n### Scene Structure\n\n```\nCharacter (CharacterBody2D)\n├── Sprite2D\n└── AnimationPlayer\n```\n\nAnimationPlayer can animate **any property** on any sibling or child node: sprite frames, modulate, position, rotation, scale, visibility, collision shape disabled state, method calls (Call Method track), audio playback (Audio Playback track).\n\n### GDScript — Basic Playback\n\n```gdscript\nextends CharacterBody2D\n\n@onready var anim_player: AnimationPlayer = $AnimationPlayer\n\nfunc _physics_process(delta: float) -> void:\n    var input_dir := Input.get_vector(\"ui_left\", \"ui_right\", \"ui_up\", \"ui_down\")\n\n    if input_dir != Vector2.ZERO:\n        velocity = input_dir * 200.0\n        anim_player.play(\"walk\")\n    else:\n        velocity = Vector2.ZERO\n        anim_player.play(\"idle\")\n\n    move_and_slide()\n```\n\n### C# — Basic Playback\n\n```csharp\nusing Godot;\n\npublic partial class Character : CharacterBody2D\n{\n    private AnimationPlayer _animPlayer;\n\n    public override void _Ready()\n    {\n        _animPlayer = GetNode\u003CAnimationPlayer>(\"AnimationPlayer\");\n    }\n\n    public override void _PhysicsProcess(double delta)\n    {\n        Vector2 inputDir = Input.GetVector(\"ui_left\", \"ui_right\", \"ui_up\", \"ui_down\");\n\n        if (inputDir != Vector2.Zero)\n        {\n            Velocity = inputDir * 200.0f;\n            _animPlayer.Play(\"walk\");\n        }\n        else\n        {\n            Velocity = Vector2.Zero;\n            _animPlayer.Play(\"idle\");\n        }\n\n        MoveAndSlide();\n    }\n}\n```\n\n> Calling `play()` with the same animation name while it's already playing does nothing (no restart). This is safe to call every frame.\n\n> **Godot 4.8+:** `Animation.INTERPOLATION_MAKIMA` (and `INTERPOLATION_MAKIMA_ANGLE`, shortest-path rotation) is a smooth interpolation like cubic that overshoots less and stays flat across three or more equal adjacent keys; it reads two keys per side, so it costs slightly more. Set it with `track_set_interpolation_type()`. `AnimationPlayer.clear_cache_on_stop` (default `true`) can be set to `false` to keep the track cache when animations start and stop often.\n\n### Playback Control\n\n```gdscript\nanim_player.play(\"attack\")\nanim_player.play_backwards(\"attack\")\nanim_player.queue(\"idle\")            # play after current\nanim_player.stop()\nanim_player.pause()\nanim_player.play()                   # resume from paused position\nanim_player.speed_scale = 2.0\nanim_player.seek(0.5)\n```\n\n```csharp\n_animPlayer.Play(\"attack\");\n_animPlayer.PlayBackwards(\"attack\");\n_animPlayer.Queue(\"idle\");\n_animPlayer.Stop();\n_animPlayer.Pause();\n_animPlayer.Play();\n_animPlayer.SpeedScale = 2.0f;\n_animPlayer.Seek(0.5);\n```\n\n---\n\n## 3. Animation Signals\n\n```gdscript\nfunc _ready() -> void:\n    anim_player.animation_finished.connect(_on_animation_finished)\n\nfunc _on_animation_finished(anim_name: StringName) -> void:\n    match anim_name:\n        \"attack\":\n            anim_player.play(\"idle\")\n        \"death\":\n            queue_free()\n```\n\n```csharp\npublic override void _Ready()\n{\n    _animPlayer = GetNode\u003CAnimationPlayer>(\"AnimationPlayer\");\n    _animPlayer.AnimationFinished += OnAnimationFinished;\n}\n\nprivate void OnAnimationFinished(StringName animName)\n{\n    if (animName == \"attack\")\n        _animPlayer.Play(\"idle\");\n    else if (animName == \"death\")\n        QueueFree();\n}\n```\n\n### Method Call Tracks\n\nAdd a **Call Method** track to trigger game logic at exact animation frames (spawn projectile at frame 5, play SFX at impact frame, enable hitbox during swing). In the Animation panel: Add Track → Call Method Track → select target node → add keyframes → set method name and arguments.\n\n```gdscript\nfunc spawn_projectile() -> void:\n    var bullet := preload(\"res:\u002F\u002Fscenes\u002Fbullet.tscn\").instantiate()\n    get_parent().add_child(bullet)\n    bullet.global_position = $Muzzle.global_position\n\nfunc enable_hitbox() -> void:\n    $HitboxArea\u002FCollisionShape2D.disabled = false\n```\n\n---\n\n## 4. Sprite Frame Animation\n\nTwo approaches for 2D character animation: `AnimatedSprite2D` (quick, frames-only) and `AnimationPlayer + Sprite2D` (full property animation). Pick AnimatedSprite2D for simple characters; AnimationPlayer when you also animate hitboxes, particles, sounds, or other properties in sync.\n\n> See [references\u002Fsprite-animation.md](references\u002Fsprite-animation.md) for the full GDScript and C# example (a CharacterBody2D walking with `AnimatedSprite2D` driven by `Input.get_vector` and `flip_h`).\n\n### Ping-Pong Playback (Godot 4.7+)\n\n`SpriteFrames` replaces the bool `set_animation_loop()` (deprecated) with `set_animation_loop_mode(anim, SpriteFrames.LOOP_PINGPONG)` (also `LOOP_NONE`, `LOOP_LINEAR`); works with `AnimatedSprite2D` and `AnimatedSprite3D`.\n\n> See [references\u002Fsprite-animation.md](references\u002Fsprite-animation.md#ping-pong-playback-godot-47) for the GDScript + C# snippet.\n\n---\n\n## 5. AnimationTree — Canonical State Machine\n\n### Scene Structure\n\n```\nCharacter (CharacterBody2D)\n├── Sprite2D\n├── AnimationPlayer        ← holds all clips\n└── AnimationTree          ← controls blending\u002Ftransitions\n    (tree_root = AnimationNodeStateMachine or AnimationNodeBlendTree)\n```\n\n**Setup:** Add AnimationTree as a sibling of AnimationPlayer. Set `anim_player` to point at the AnimationPlayer. Set `active = true`. Choose a root: **AnimationNodeStateMachine** (discrete states with transitions) or **AnimationNodeBlendTree** (continuous blending).\n\n### State Machine Playback\n\nThe canonical pattern: cache `AnimationNodeStateMachinePlayback` from `anim_tree[\"parameters\u002Fplayback\"]`, call `travel(\"state\")` from gameplay code (`travel()` transitions smoothly; `start()` switches immediately), and query the active state with `get_current_node()`.\n\n> See [references\u002Fstate-machine-examples.md](references\u002Fstate-machine-examples.md) for the full GDScript and C# CharacterBody2D example.\n\n### Blend Trees — BlendSpace1D \u002F BlendSpace2D\n\nFor continuous blending (walk↔run on speed, 4\u002F8-directional movement on a 2D vector), set the root to **AnimationNodeBlendTree**, add a **BlendSpace1D** or **BlendSpace2D**, and set `anim_tree[\"parameters\u002FBlendSpace2D\u002Fblend_position\"]` from gameplay code every frame.\n\n> See [references\u002Fblend-spaces.md](references\u002Fblend-spaces.md) for blend point placement and the GDScript + C# code that drives a 1D speed blend and a 2D direction blend.\n\n### Named Blend Points (Godot 4.7+)\n\n`add_blend_point()` gains an optional `name` parameter (pass one: empty names will be deprecated); look points up with `find_blend_point_by_name()`.\n\n> See [references\u002Fblend-spaces.md](references\u002Fblend-spaces.md#named-blend-points-godot-47) for the GDScript + C# snippet.\n\n> ⚠️ **Changed in Godot 4.7:** the bool `sync` on `AnimationNodeBlendSpace1D\u002F2D` is deprecated, replaced by the `sync_mode` property (C#: `SyncMode`), which takes an enum: `SYNC_MODE_NONE` (default — inactive animations frozen), `SYNC_MODE_INDEPENDENT` (the old `sync = true`), `SYNC_MODE_CYCLIC_MUTABLE`, `SYNC_MODE_CYCLIC_CONSTANT`. If a tree that blended correctly in 4.6 stops transitioning correctly, set `sync_mode` on each blend space. Full enum semantics: [references\u002Fblend-spaces.md](references\u002Fblend-spaces.md#sync-mode-godot-47).\n\n---\n\n## 6. Skeleton Modifiers (3D, 4.4+)\n\n### LookAtModifier3D (Godot 4.4+)\n\nProcedurally rotates a bone to look at a world-space target. Ideal for head tracking and eye contact without extra animation clips.\n\n> See [references\u002Fskeleton-modifiers.md](references\u002Fskeleton-modifiers.md) for the full GDScript and C# example with angle limits and influence blending.\n\n> ⚠️ **Changed in Godot 4.7:** `LookAtModifier3D.relative` defaults to `false` (rotation relative to the rest pose); only 4.6.0 used `true`. Set `relative = true` to restore it — details in [references\u002Fskeleton-modifiers.md](references\u002Fskeleton-modifiers.md).\n\n### BoneConstraint3D (Godot 4.5+)\n\n`AimModifier3D`, `CopyTransformModifier3D`, and `ConvertTransformModifier3D` take their reference from **another bone** on the same skeleton (mirroring, secondary rig binding, bone-to-bone aiming); from Godot 4.6 the reference can also be a `Node3D` (`REFERENCE_TYPE_NODE`).\n\n> See [references\u002Fbone-constraints.md](references\u002Fbone-constraints.md) for the full deep dive — modifier table, scene structure, GDScript and C# examples for AimModifier3D and CopyTransformModifier3D.\n\n### SpringBoneSimulator3D (Godot 4.4+)\n\nSimulates spring physics on bones — hair, capes, tails, antennas bounce and sway procedurally. Add as child of `Skeleton3D`, configure spring chains (root bone, end bone, radius, stiffness, drag, gravity) in the Inspector.\n\n> See [references\u002Fskeleton-modifiers.md](references\u002Fskeleton-modifiers.md) for property reference table and recommended starting values per use-case (hair, antennas, capes).\n\n### Animation Markers (Godot 4.4+)\n\nNamed points\u002Fregions inside a clip (timeline → **Insert Marker...**) for subregion loops and frame-exact events without splitting clips; play a region with `play_section_with_markers()`.\n\n> See [references\u002Fanimation-markers.md](references\u002Fanimation-markers.md) for the workflow and GDScript + C# code.\n\n### Animation Retargeting (Godot 4.3+)\n\nGodot 4.3 retargets animations from one skeleton to another during `.glb`\u002F`.gltf` import via `SkeletonProfile` (e.g., `SkeletonProfileHumanoid`). Animations then target generic profile bone names, so any matching skeleton can play them.\n\n> See [references\u002Fretargeting.md](references\u002Fretargeting.md) for the full import-dock setup steps.\n\n---\n\n## 7. IKModifier3D — Solver Comparison (Godot 4.6+)\n\nGodot 4.6 adds `IKModifier3D`, a base class for skeletal IK solvers, with five ready-to-use solvers: `TwoBoneIK3D`, `CCDIK3D`, `FABRIK3D`, `JacobianIK3D` and `SplineIK3D`. These are `SkeletonModifier3D` children of `Skeleton3D` and work alongside other modifiers (e.g., `LookAtModifier3D`).\n\nPick by chain: `TwoBoneIK3D` for exactly-two-bone limbs (needs a pole node), `FABRIK3D` for simple chains without joint limits, `CCDIK3D` when joints have limits, `SplineIK3D` to follow a `Path3D`, and `JacobianIK3D` for smooth organic motion with slower tracking.\n\n> See [references\u002Fik-solver-comparison.md](references\u002Fik-solver-comparison.md) for the full solver comparison table and selection guidance.\n\n> See [references\u002Fik-recipes.md](references\u002Fik-recipes.md) for the full GDScript and C# recipes — arm reach with influence blending (CCDIK3D), foot placement on uneven terrain (FABRIK3D + raycast), and basic FABRIK arm IK setup.\n\n---\n\n## 8. Common Recipes\n\nTwo gameplay-flavored animation recipes: a hit-flash modulate tween and a buffered attack combo using AnimationPlayer's Call Method track.\n\n> See [references\u002Fcommon-recipes.md](references\u002Fcommon-recipes.md) for the full GDScript and C# code (Hit Flash, Attack Combo with combo-window buffering).\n\n---\n\n## 9. Common Pitfalls\n\nQuick symptom → cause → fix table covering animation snapping instead of blending, an inactive AnimationTree, `travel()` not transitioning, wrong track node paths, silent Call Method tracks, dead blend parameters, and per-frame `play()` resets.\n\n> See [references\u002Fcommon-pitfalls.md](references\u002Fcommon-pitfalls.md) for the full table.\n\n---\n\n## 10. Implementation Checklist\n\n- [ ] AnimationPlayer is a direct child of the animated node (not nested deeper)\n- [ ] All animation track node paths are valid (no broken references after scene restructuring)\n- [ ] AnimationTree `active` is set to `true` and `anim_player` points to the correct AnimationPlayer\n- [ ] State machine transitions have appropriate fade times (0.1–0.2s for responsive gameplay)\n- [ ] Looping animations (idle, walk, run) have loop mode set to **Loop** in the Animation panel\n- [ ] One-shot animations (attack, jump, death) have loop mode set to **None**\n- [ ] Call Method tracks are used for gameplay events (hitbox enable\u002Fdisable, spawn projectiles, play SFX)\n- [ ] Blend parameters are set from gameplay code every frame (not just on state change)\n- [ ] `animation_finished` signal is connected for one-shot animations that need follow-up logic\n- [ ] Head\u002Feye tracking uses `LookAtModifier3D` instead of manual bone rotation (Godot 4.4+)\n- [ ] Hair, capes, and tails use `SpringBoneSimulator3D` instead of custom physics scripts (Godot 4.4+)\n- [ ] Shared animation libraries use retargeting with `SkeletonProfileHumanoid` (Godot 4.3+)\n- [ ] Bone-to-bone aim\u002Fcopy constraints use `AimModifier3D` \u002F `CopyTransformModifier3D` instead of manual bone transform code (Godot 4.5+)\n- [ ] Arm\u002Fleg IK uses `IKModifier3D` subclasses (`TwoBoneIK3D` with a pole node for two-bone limbs, `FABRIK3D` or `CCDIK3D` for longer chains) rather than custom IK scripts (Godot 4.6+)\n","# Animation System 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:** **state-machine** for gameplay state management, **player-controller** for movement that drives animation, **component-system** for reusable animation components, **2d-essentials** for TileMaps, parallax scrolling, 2D lights, and canvas layer organization, **3d-essentials** for AnimationTree and 3D animation blending, **shader-basics** for shader-driven hit flash and dissolve effects, **tween-animation** for code-driven motion alongside keyframe animation.\n\n---\n\n## 1. Core Concepts\n\n### AnimationPlayer vs AnimationTree\n\n| Node              | Use For                                  | Complexity | Notes                                              |\n|-------------------|------------------------------------------|------------|----------------------------------------------------|\n| `AnimationPlayer` | Simple playback, one-shot effects        | Low        | Play\u002Fstop\u002Fqueue individual clips directly          |\n| `AnimationTree`   | Blending, transitions, layered animation | Medium-High| State machines and blend trees for smooth transitions |\n\n**Rule of thumb:** Start with AnimationPlayer. Add AnimationTree when you need blending between animations (walk\u002Frun blend, directional movement, layered upper\u002Flower body).\n\n### Animation Workflow\n\n```\n1. Create AnimationPlayer node       → holds all animation clips\n2. Add tracks in the Animation panel → keyframe properties, methods, audio\n3. (Optional) Add AnimationTree      → blend\u002Ftransition logic\n4. Trigger from code                 → play(), travel(), set parameters\n```\n\n---\n\n## 2. AnimationPlayer Basics\n\n### Scene Structure\n\n```\nCharacter (CharacterBody2D)\n├── Sprite2D\n└── AnimationPlayer\n```\n\nAnimationPlayer can animate **any property** on any sibling or child node: sprite frames, modulate, position, rotation, scale, visibility, collision shape disabled state, method calls (Call Method track), audio playback (Audio Playback track).\n\n### GDScript — Basic Playback\n\n```gdscript\nextends CharacterBody2D\n\n@onready var anim_player: AnimationPlayer = $AnimationPlayer\n\nfunc _physics_process(delta: float) -> void:\n    var input_dir := Input.get_vector(\"ui_left\", \"ui_right\", \"ui_up\", \"ui_down\")\n\n    if input_dir != Vector2.ZERO:\n        velocity = input_dir * 200.0\n        anim_player.play(\"walk\")\n    else:\n        velocity = Vector2.ZERO\n        anim_player.play(\"idle\")\n\n    move_and_slide()\n```\n\n### C# — Basic Playback\n\n```csharp\nusing Godot;\n\npublic partial class Character : CharacterBody2D\n{\n    private AnimationPlayer _animPlayer;\n\n    public override void _Ready()\n    {\n        _animPlayer = GetNode\u003CAnimationPlayer>(\"AnimationPlayer\");\n    }\n\n    public override void _PhysicsProcess(double delta)\n    {\n        Vector2 inputDir = Input.GetVector(\"ui_left\", \"ui_right\", \"ui_up\", \"ui_down\");\n\n        if (inputDir != Vector2.Zero)\n        {\n            Velocity = inputDir * 200.0f;\n            _animPlayer.Play(\"walk\");\n        }\n        else\n        {\n            Velocity = Vector2.Zero;\n            _animPlayer.Play(\"idle\");\n        }\n\n        MoveAndSlide();\n    }\n}\n```\n\n> Calling `play()` with the same animation name while it's already playing does nothing (no restart). This is safe to call every frame.\n\n> **Godot 4.8+:** `Animation.INTERPOLATION_MAKIMA` (and `INTERPOLATION_MAKIMA_ANGLE`, shortest-path rotation) is a smooth interpolation like cubic that overshoots less and stays flat across three or more equal adjacent keys; it reads two keys per side, so it costs slightly more. Set it with `track_set_interpolation_type()`. `AnimationPlayer.clear_cache_on_stop` (default `true`) can be set to `false` to keep the track cache when animations start and stop often.\n\n### Playback Control\n\n```gdscript\nanim_player.play(\"attack\")\nanim_player.play_backwards(\"attack\")\nanim_player.queue(\"idle\")            # play after current\nanim_player.stop()\nanim_player.pause()\nanim_player.play()                   # resume from paused position\nanim_player.speed_scale = 2.0\nanim_player.seek(0.5)\n```\n\n```csharp\n_animPlayer.Play(\"attack\");\n_animPlayer.PlayBackwards(\"attack\");\n_animPlayer.Queue(\"idle\");\n_animPlayer.Stop();\n_animPlayer.Pause();\n_animPlayer.Play();\n_animPlayer.SpeedScale = 2.0f;\n_animPlayer.Seek(0.5);\n```\n\n---\n\n## 3. Animation Signals\n\n```gdscript\nfunc _ready() -> void:\n    anim_player.animation_finished.connect(_on_animation_finished)\n\nfunc _on_animation_finished(anim_name: StringName) -> void:\n    match anim_name:\n        \"attack\":\n            anim_player.play(\"idle\")\n        \"death\":\n            queue_free()\n```\n\n```csharp\npublic override void _Ready()\n{\n    _animPlayer = GetNode\u003CAnimationPlayer>(\"AnimationPlayer\");\n    _animPlayer.AnimationFinished += OnAnimationFinished;\n}\n\nprivate void OnAnimationFinished(StringName animName)\n{\n    if (animName == \"attack\")\n        _animPlayer.Play(\"idle\");\n    else if (animName == \"death\")\n        QueueFree();\n}\n```\n\n### Method Call Tracks\n\nAdd a **Call Method** track to trigger game logic at exact animation frames (spawn projectile at frame 5, play SFX at impact frame, enable hitbox during swing). In the Animation panel: Add Track → Call Method Track → select target node → add keyframes → set method name and arguments.\n\n```gdscript\nfunc spawn_projectile() -> void:\n    var bullet := preload(\"res:\u002F\u002Fscenes\u002Fbullet.tscn\").instantiate()\n    get_parent().add_child(bullet)\n    bullet.global_position = $Muzzle.global_position\n\nfunc enable_hitbox() -> void:\n    $HitboxArea\u002FCollisionShape2D.disabled = false\n```\n\n---\n\n## 4. Sprite Frame Animation\n\nTwo approaches for 2D character animation: `AnimatedSprite2D` (quick, frames-only) and `AnimationPlayer + Sprite2D` (full property animation). Pick AnimatedSprite2D for simple characters; AnimationPlayer when you also animate hitboxes, particles, sounds, or other properties in sync.\n\n> See [references\u002Fsprite-animation.md](references\u002Fsprite-animation.md) for the full GDScript and C# example (a CharacterBody2D walking with `AnimatedSprite2D` driven by `Input.get_vector` and `flip_h`).\n\n### Ping-Pong Playback (Godot 4.7+)\n\n`SpriteFrames` replaces the bool `set_animation_loop()` (deprecated) with `set_animation_loop_mode(anim, SpriteFrames.LOOP_PINGPONG)` (also `LOOP_NONE`, `LOOP_LINEAR`); works with `AnimatedSprite2D` and `AnimatedSprite3D`.\n\n> See [references\u002Fsprite-animation.md](references\u002Fsprite-animation.md#ping-pong-playback-godot-47) for the GDScript + C# snippet.\n\n---\n\n## 5. AnimationTree — Canonical State Machine\n\n### Scene Structure\n\n```\nCharacter (CharacterBody2D)\n├── Sprite2D\n├── AnimationPlayer        ← holds all clips\n└── AnimationTree          ← controls blending\u002Ftransitions\n    (tree_root = AnimationNodeStateMachine or AnimationNodeBlendTree)\n```\n\n**Setup:** Add AnimationTree as a sibling of AnimationPlayer. Set `anim_player` to point at the AnimationPlayer. Set `active = true`. Choose a root: **AnimationNodeStateMachine** (discrete states with transitions) or **AnimationNodeBlendTree** (continuous blending).\n\n### State Machine Playback\n\nThe canonical pattern: cache `AnimationNodeStateMachinePlayback` from `anim_tree[\"parameters\u002Fplayback\"]`, call `travel(\"state\")` from gameplay code (`travel()` transitions smoothly; `start()` switches immediately), and query the active state with `get_current_node()`.\n\n> See [references\u002Fstate-machine-examples.md](references\u002Fstate-machine-examples.md) for the full GDScript and C# CharacterBody2D example.\n\n### Blend Trees — BlendSpace1D \u002F BlendSpace2D\n\nFor continuous blending (walk↔run on speed, 4\u002F8-directional movement on a 2D vector), set the root to **AnimationNodeBlendTree**, add a **BlendSpace1D** or **BlendSpace2D**, and set `anim_tree[\"parameters\u002FBlendSpace2D\u002Fblend_position\"]` from gameplay code every frame.\n\n> See [references\u002Fblend-spaces.md](references\u002Fblend-spaces.md) for blend point placement and the GDScript + C# code that drives a 1D speed blend and a 2D direction blend.\n\n### Named Blend Points (Godot 4.7+)\n\n`add_blend_point()` gains an optional `name` parameter (pass one: empty names will be deprecated); look points up with `find_blend_point_by_name()`.\n\n> See [references\u002Fblend-spaces.md](references\u002Fblend-spaces.md#named-blend-points-godot-47) for the GDScript + C# snippet.\n\n> ⚠️ **Changed in Godot 4.7:** the bool `sync` on `AnimationNodeBlendSpace1D\u002F2D` is deprecated, replaced by the `sync_mode` property (C#: `SyncMode`), which takes an enum: `SYNC_MODE_NONE` (default — inactive animations frozen), `SYNC_MODE_INDEPENDENT` (the old `sync = true`), `SYNC_MODE_CYCLIC_MUTABLE`, `SYNC_MODE_CYCLIC_CONSTANT`. If a tree that blended correctly in 4.6 stops transitioning correctly, set `sync_mode` on each blend space. Full enum semantics: [references\u002Fblend-spaces.md](references\u002Fblend-spaces.md#sync-mode-godot-47).\n\n---\n\n## 6. Skeleton Modifiers (3D, 4.4+)\n\n### LookAtModifier3D (Godot 4.4+)\n\nProcedurally rotates a bone to look at a world-space target. Ideal for head tracking and eye contact without extra animation clips.\n\n> See [references\u002Fskeleton-modifiers.md](references\u002Fskeleton-modifiers.md) for the full GDScript and C# example with angle limits and influence blending.\n\n> ⚠️ **Changed in Godot 4.7:** `LookAtModifier3D.relative` defaults to `false` (rotation relative to the rest pose); only 4.6.0 used `true`. Set `relative = true` to restore it — details in [references\u002Fskeleton-modifiers.md](references\u002Fskeleton-modifiers.md).\n\n### BoneConstraint3D (Godot 4.5+)\n\n`AimModifier3D`, `CopyTransformModifier3D`, and `ConvertTransformModifier3D` take their reference from **another bone** on the same skeleton (mirroring, secondary rig binding, bone-to-bone aiming); from Godot 4.6 the reference can also be a `Node3D` (`REFERENCE_TYPE_NODE`).\n\n> See [references\u002Fbone-constraints.md](references\u002Fbone-constraints.md) for the full deep dive — modifier table, scene structure, GDScript and C# examples for AimModifier3D and CopyTransformModifier3D.\n\n### SpringBoneSimulator3D (Godot 4.4+)\n\nSimulates spring physics on bones — hair, capes, tails, antennas bounce and sway procedurally. Add as child of `Skeleton3D`, configure spring chains (root bone, end bone, radius, stiffness, drag, gravity) in the Inspector.\n\n> See [references\u002Fskeleton-modifiers.md](references\u002Fskeleton-modifiers.md) for property reference table and recommended starting values per use-case (hair, antennas, capes).\n\n### Animation Markers (Godot 4.4+)\n\nNamed points\u002Fregions inside a clip (timeline → **Insert Marker...**) for subregion loops and frame-exact events without splitting clips; play a region with `play_section_with_markers()`.\n\n> See [references\u002Fanimation-markers.md](references\u002Fanimation-markers.md) for the workflow and GDScript + C# code.\n\n### Animation Retargeting (Godot 4.3+)\n\nGodot 4.3 retargets animations from one skeleton to another during `.glb`\u002F`.gltf` import via `SkeletonProfile` (e.g., `SkeletonProfileHumanoid`). Animations then target generic profile bone names, so any matching skeleton can play them.\n\n> See [references\u002Fretargeting.md](references\u002Fretargeting.md) for the full import-dock setup steps.\n\n---\n\n## 7. IKModifier3D — Solver Comparison (Godot 4.6+)\n\nGodot 4.6 adds `IKModifier3D`, a base class for skeletal IK solvers, with five ready-to-use solvers: `TwoBoneIK3D`, `CCDIK3D`, `FABRIK3D`, `JacobianIK3D` and `SplineIK3D`. These are `SkeletonModifier3D` children of `Skeleton3D` and work alongside other modifiers (e.g., `LookAtModifier3D`).\n\nPick by chain: `TwoBoneIK3D` for exactly-two-bone limbs (needs a pole node), `FABRIK3D` for simple chains without joint limits, `CCDIK3D` when joints have limits, `SplineIK3D` to follow a `Path3D`, and `JacobianIK3D` for smooth organic motion with slower tracking.\n\n> See [references\u002Fik-solver-comparison.md](references\u002Fik-solver-comparison.md) for the full solver comparison table and selection guidance.\n\n> See [references\u002Fik-recipes.md](references\u002Fik-recipes.md) for the full GDScript and C# recipes — arm reach with influence blending (CCDIK3D), foot placement on uneven terrain (FABRIK3D + raycast), and basic FABRIK arm IK setup.\n\n---\n\n## 8. Common Recipes\n\nTwo gameplay-flavored animation recipes: a hit-flash modulate tween and a buffered attack combo using AnimationPlayer's Call Method track.\n\n> See [references\u002Fcommon-recipes.md](references\u002Fcommon-recipes.md) for the full GDScript and C# code (Hit Flash, Attack Combo with combo-window buffering).\n\n---\n\n## 9. Common Pitfalls\n\nQuick symptom → cause → fix table covering animation snapping instead of blending, an inactive AnimationTree, `travel()` not transitioning, wrong track node paths, silent Call Method tracks, dead blend parameters, and per-frame `play()` resets.\n\n> See [references\u002Fcommon-pitfalls.md](references\u002Fcommon-pitfalls.md) for the full table.\n\n---\n\n## 10. Implementation Checklist\n\n- [ ] AnimationPlayer is a direct child of the animated node (not nested deeper)\n- [ ] All animation track node paths are valid (no broken references after scene restructuring)\n- [ ] AnimationTree `active` is set to `true` and `anim_player` points to the correct AnimationPlayer\n- [ ] State machine transitions have appropriate fade times (0.1–0.2s for responsive gameplay)\n- [ ] Looping animations (idle, walk, run) have loop mode set to **Loop** in the Animation panel\n- [ ] One-shot animations (attack, jump, death) have loop mode set to **None**\n- [ ] Call Method tracks are used for gameplay events (hitbox enable\u002Fdisable, spawn projectiles, play SFX)\n- [ ] Blend parameters are set from gameplay code every frame (not just on state change)\n- [ ] `animation_finished` signal is connected for one-shot animations that need follow-up logic\n- [ ] Head\u002Feye tracking uses `LookAtModifier3D` instead of manual bone rotation (Godot 4.4+)\n- [ ] Hair, capes, and tails use `SpringBoneSimulator3D` instead of custom physics scripts (Godot 4.4+)\n- [ ] Shared animation libraries use retargeting with `SkeletonProfileHumanoid` (Godot 4.3+)\n- [ ] Bone-to-bone aim\u002Fcopy constraints use `AimModifier3D` \u002F `CopyTransformModifier3D` instead of manual bone transform code (Godot 4.5+)\n- [ ] Arm\u002Fleg IK uses `IKModifier3D` subclasses (`TwoBoneIK3D` with a pole node for two-bone limbs, `FABRIK3D` or `CCDIK3D` for longer chains) rather than custom IK scripts (Godot 4.6+)\n",{"name":5,"description":7},"master","60c28fdc40706a24576731e9fb3508b9c95258ad","skills\u002Fanimation-system",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":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add jame581\u002FGodotPrompter --skill animation-system",{"tool":53,"command":54},"bunx","bunx skills add jame581\u002FGodotPrompter --skill animation-system",{"tool":56,"command":57},"pnpm","pnpm dlx skills add jame581\u002FGodotPrompter --skill animation-system","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002FSKILL.md",true,[61,67,71,75,79,83,87,91,95,99,103],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fanimation-markers.md","REFERENCE","参考文档",1637,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fanimation-markers.md",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fblend-spaces.md",2493,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fblend-spaces.md",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fbone-constraints.md",3717,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fbone-constraints.md",{"path":76,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fcommon-pitfalls.md",1844,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fcommon-pitfalls.md",{"path":80,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fcommon-recipes.md",3302,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fcommon-recipes.md",{"path":84,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fik-recipes.md",6932,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fik-recipes.md",{"path":88,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fik-solver-comparison.md",1640,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fik-solver-comparison.md",{"path":92,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fretargeting.md",1207,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fretargeting.md",{"path":96,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fskeleton-modifiers.md",2837,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fskeleton-modifiers.md",{"path":100,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fsprite-animation.md",3020,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fsprite-animation.md",{"path":104,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002Fstate-machine-examples.md",1949,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fanimation-system\u002Freferences\u002Fstate-machine-examples.md",[108,128,149,179,203,219],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":33},"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",[],[115,116,31,117,118,119,120,121,122,123,124,26,125,126,127],"xr development","development","deployment","godot","vr","setup","tracking","godot 4","ar","hand","Meta","applications","quest",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":33},"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",[],[135,136,137,138,139,140,141,142,26,31,118,143,144,145,146,147,148],"web services","web","services","tls","retries","calling","auth","downloads","clients","headers","secrets","json","build","REST",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":160,"publishedAt":33},"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",[155],{"categoryNo":156,"categoryName":157,"taxonomyType":158,"taxonomyTypeDesc":159},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[136,161,162,163,164,165,166,167,144,168,169,31,170,171,172,173,174,175,26,176,177,178],"export","web export","threads","limits","shipping","size","options","hosting","input","Coop","preset","browser","game","io","load","pwa","Audio","server",{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":193,"publishedAt":33},"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",[185,188],{"categoryNo":186,"categoryName":187,"taxonomyType":158,"taxonomyTypeDesc":159},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":189,"categoryName":190,"taxonomyType":191,"taxonomyTypeDesc":192},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[118,194,195,196,197,26,198,199,200,201,202],"using godot prompter","find","with","bootstrap","tool","platform","mapping","how","how to",{"skillNo":204,"name":205,"nameZh":6,"description":206,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":207,"categories":208,"keywords":209,"publishedAt":33},"01M6KRER5G7EQWKGAFN8QJKQ69","tween-animation","Use when implementing tweens — property animation, method tweening, chaining, parallel sequences, easing, and common UI\u002Fgameplay motion recipes","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002FSKILL.md",[],[210,19,26,211,212,213,214,215,216,217,22,31,218],"tween animation","motion","parallel","gameplay","chaining","ui","recipes","common","sequences",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":223,"categories":224,"keywords":225,"publishedAt":33},"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",[],[28,226,227,118,31,228,229,230,24,231,196,26,22,232],"state machine","machine","patterns","node","fsm","trade","trade-offs"]