godot-animation
БесплатноБез исполняемых скриптовНе проверенGodot 4.7 animation APIs: AnimationPlayer, AnimationTree state machines, AnimatedSprite2D and create_tween() Tweens, with a headless state test. Use when…
от gamedev-skills★ 12 656 звёзд на GitHubОб этом скилле
Godot Animation (4.x)
Drive clips, blends and tweens the way Godot expects, then prove the names and states with a
headless test. Targets Godot 4.7; check config/features in project.godot first.
Workflow
- Pick one owner per property.
AnimationPlayerstores keyframed clips. An activeAnimationTreeplays those clips and owns their tracks, so code talks to the tree.Tweenis for short code-driven moves (UI pops, fades, one-off motion). - Characters: clips in an
AnimationPlayer, then anAnimationTreewithanim_playerpointing at it,active = true, and anAnimationNodeStateMachineor blend space astree_root. Sprite sheets:AnimatedSprite2D+SpriteFrames, or keyframein a clip. - Drive from gameplay state, not input: pick the state from velocity and floor checks
each physics tick and call
travel(); set blend positions throughparameters/paths. - Events:
animation_finishedfor non-looping clips, Call Method tracks for frame-exact hits and footsteps. - Verify before you finish (paths are relative to this skill's folder):
- If
godot-nodes-scenesis installed, runpython3 ../godot-nodes-scenes/scripts/check_godot_project.py <project>after editing.tscnfiles; it catches broken resource paths andparent=node paths. The headless test below coversanim_player. - Run the scene headless and read the log, because Godot exits 0 after these errors:
godot --headless --path <project> --quit-after 300 res://player.tscn > run.log 2>&1, thengrep -nE "SCRIPT ERROR|^ERROR:" run.log. "Animation not found", "No such node" (badtravel()target) and "started with no Tweeners" all land there. - Copy
assets/test_animation_states.gdtores://tests/, list the clip and state names the code uses, and run it withgodot --headless --path <project> --script res://tests/test_animation_states.gd. Exit 0 means every clip exists, the tree is active and wired, and each state is reachable. CI wiring:godot-gdscript-headless-testing. - Timing and look need eyes: ask the user to play the scene and report anything that pops, slides or plays at the wrong moment.
- If
Patterns
1. Play a clip and continue when it ends
@onready var anim: AnimationPlayer = $AnimationPlayer
func attack() -> void:
anim.play("attack") # must not loop, or the signal never comes
await anim.animation_finished
anim.play("idle")
2. State machine: travel between states
@onready var tree: AnimationTree = $AnimationTree
@onready var playback: AnimationNodeStateMachinePlayback = tree.get("parameters/playback")
func _physics_process(_delta: float) -> void:
var moving := velocity.length() > 5.0
playback.travel(&"run" if moving else &"idle") # follows the graph's transitions
travel() walks the shortest path of enabled transitions; start(&"state") jumps there at
once. Calling travel() every tick with the state it is already in does not restart it.
3. Blend space: blend run direction by a 2D parameter
# tree.tree_root is an AnimationNodeBlendSpace2D with idle/run points placed in it.
func update_locomotion(input_dir: Vector2) -> void:
tree.set("parameters/blend_position", input_dir)
# If the blend space is instead a child named "Move" in a blend tree/state machine,
# its parameter is "parameters/Move/blend_position".
4. Tween: pop a UI element in
func pop_in(node: Control) -> void:
node.pivot_offset_ratio = Vector2(0.5, 0.5) # scale from the centre, even after resizes
node.scale = Vector2.ZERO
node.modulate.a = 0.0
var tw := create_tween().set_parallel(true)
tw.tween_property(node, "scale", Vector2.ONE, 0.2) \
.set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_OUT)
tw.tween_property(node, "modulate:a", 1.0, 0.2) # sub-property via ":"
Gotchas
- Nothing animates and
travel()does nothing →AnimationTree.activeis false oranim_playeris empty or points at the wrong node. await anim.animation_finishednever returns → the clip loops; looping clips do not emit it. Await a non-looping clip, or use a Call Method key at the end of the loop.play("run")does not restart the clip → playing the clip that is already playing continues from the current position. Callstop()first orseek(0.0, true)to restart.- The tree and code fight → while an
AnimationTreeis active,AnimationPlayer.play()on the same clips is overridden. Change states through the tree. - Wrong parameter path → root parameters start at
parameters/(parameters/playback,parameters/blend_position); a named child adds its name (parameters/Move/blend_position). The tree's Inspector lists them under Parameters. Tween (bound to ...): started with no Tweeners→create_tween()was called and nothing was added that fr
Установить godot-animation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл godot-animation?
Godot 4.7 animation APIs: AnimationPlayer, AnimationTree state machines, AnimatedSprite2D and create_tween() Tweens, with a headless state test. Use when travel() does nothing, an animation will not play, a tween snaps back or the log says "Animation not found". Not for easing choices (`game-feel`), sprite art (`create-game-assets`) or Unity (`unity-animation`).
Как установить скилл godot-animation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл godot-animation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic