jame581/godotprompter/animation-system
Claude Code and agent skill by jame581/godotprompter
- community
Checking that the SKILL.md file is still in the repository.
Use when implementing animations — AnimationPlayer, AnimationTree, blend trees, state machines, sprite animation, and code-driven animation
Install
npx vskill@latest install jame581/godotprompter/animation-systemSKILL.md
The same SKILL.md was published earlier as jame581/godotprompter/animation-system.
Animation System in Godot 4.3+
All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.
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.
1. Core Concepts
AnimationPlayer vs AnimationTree
| Node | Use For | Complexity | Notes | |
|---|---|---|---|---|
AnimationPlayer | Simple playback, one-shot effects | Low | Play/stop/queue individual clips directly | |
AnimationTree | Blending, transitions, layered animation | Medium-High | State machines and blend trees for smooth transitions |
Rule of thumb: Start with AnimationPlayer. Add AnimationTree when you need blending between animations (walk/run blend, directional movement, layered upper/lower body).
Animation Workflow
2. AnimationPlayer Basics
Scene Structure
AnimationPlayer 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).
GDScript — Basic Playback
C# — Basic Playback
Callingplay()with the same animation name while it's already playing does nothing (no restart). This is safe to call every frame.
Godot 4.8+:Animation.INTERPOLATION_MAKIMA(andINTERPOLATION_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 withtrack_set_interpolation_type().AnimationPlayer.clear_cache_on_stop(defaulttrue) can be set tofalseto keep the track cache when animations start and stop often.
Playback Control
3. Animation Signals
Method Call Tracks
Add 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.
4. Sprite Frame Animation
Two 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.
See references/sprite-animation.md for the full GDScript and C# example (a CharacterBody2D walking withAnimatedSprite2Ddriven byInput.get_vectorandflip_h).
Ping-Pong Playback (Godot 4.7+)
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.
See references/sprite-animation.md for the GDScript + C# snippet.
5. AnimationTree — Canonical State Machine
Scene Structure
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).
State Machine Playback
The canonical pattern: cache AnimationNodeStateMachinePlayback from anim_tree["parameters/playback"], call travel("state") from gameplay code (travel() transitions smoothly; start() switches immediately), and query the active state with get_current_node().
See references/state-machine-examples.md for the full GDScript and C# CharacterBody2D example.
Blend Trees — BlendSpace1D / BlendSpace2D
For continuous blending (walk↔run on speed, 4/8-directional movement on a 2D vector), set the root to AnimationNodeBlendTree, add a BlendSpace1D or BlendSpace2D, and set anim_tree["parameters/BlendSpace2D/blend_position"] from gameplay code every frame.
See references/blend-spaces.md for blend point placement and the GDScript + C# code that drives a 1D speed blend and a 2D direction blend.
Named Blend Points (Godot 4.7+)
add_blend_point() gains an optional name parameter (pass one: empty names will be deprecated); look points up with find_blend_point_by_name().
See references/blend-spaces.md for the GDScript + C# snippet.
⚠️ Changed in Godot 4.7: the boolsynconAnimationNodeBlendSpace1D/2Dis deprecated, replaced by thesync_modeproperty (C#:SyncMode), which takes an enum:SYNC_MODE_NONE(default — inactive animations frozen),SYNC_MODE_INDEPENDENT(the oldsync = true),SYNC_MODE_CYCLIC_MUTABLE,SYNC_MODE_CYCLIC_CONSTANT. If a tree that blended correctly in 4.6 stops transitioning correctly, setsync_modeon each blend space. Full enum semantics: references/blend-spaces.md.
6. Skeleton Modifiers (3D, 4.4+)
LookAtModifier3D (Godot 4.4+)
Procedurally rotates a bone to look at a world-space target. Ideal for head tracking and eye contact without extra animation clips.
See references/skeleton-modifiers.md for the full GDScript and C# example with angle limits and influence blending.
⚠️ Changed in Godot 4.7:LookAtModifier3D.relativedefaults tofalse(rotation relative to the rest pose); only 4.6.0 usedtrue. Setrelative = trueto restore it — details in references/skeleton-modifiers.md.
BoneConstraint3D (Godot 4.5+)
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).
See references/bone-constraints.md for the full deep dive — modifier table, scene structure, GDScript and C# examples for AimModifier3D and CopyTransformModifier3D.
SpringBoneSimulator3D (Godot 4.4+)
Simulates 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.
See references/skeleton-modifiers.md for property reference table and recommended starting values per use-case (hair, antennas, capes).
Animation Markers (Godot 4.4+)
Named points/regions inside a clip (timeline → Insert Marker...) for subregion loops and frame-exact events without splitting clips; play a region with play_section_with_markers().
See references/animation-markers.md for the workflow and GDScript + C# code.
Animation Retargeting (Godot 4.3+)
Godot 4.3 retargets animations from one skeleton to another during .glb/.gltf import via SkeletonProfile (e.g., SkeletonProfileHumanoid). Animations then target generic profile bone names, so any matching skeleton can play them.
See references/retargeting.md for the full import-dock setup steps.
7. IKModifier3D — Solver Comparison (Godot 4.6+)
Godot 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).
Pick 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.
See references/ik-solver-comparison.md for the full solver comparison table and selection guidance.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/animation-system/SKILL.md
Popularity
- Repository stars
- 354
- Repository forks
- 18
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jame581/godotprompter/animation-system)