Install any skill in seconds. Free to start, no credit card required.
Get Started Free →gamedev-skills/godot-animation
Animate in Godot 4.x three ways: AnimationPlayer for keyframed clips (incl. call and signal tracks), AnimationTree with state machines and blend spaces for character animation, and Tween for short procedural/UI tweens via create_tween().
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
1 fixed21 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
I'm building a 2D platformer in Godot 4. I have an idle, walk, and jump clip set up. I want to use a state machine to switch between these animations depending on what the character is doing. Can you provide the GDScript code to handle transitioning between these different animation states?
| Checked | Without skill | With skill |
|---|---|---|
| Uses an AnimationTree node | Missed | Passed |
| Retrieves the playback object from parameters/playback | Missed | Passed |
| Calls the travel() method to transition states | Missed | Passed |
The instructions your model reads when the skill loads.
Choose and drive the right animation tool: AnimationPlayer (clips), AnimationTree
(blending/state machines), or Tween (short procedural moves). Targets Godot 4.7.
When not to use: the movement logic that decides which state to play →
godot-2d-movement; UI layout (vs. UI tweening) → godot-ui-control; shader-driven
effects → godot-shaders.
AnimationPlayer — author keyframed clips (transforms, properties, method calls,
audio, even other animations). The source of truth for clip data.AnimationTree — blend and transition between those clips at runtime with a state
machine and/or blend spaces. Needs an AnimationPlayer to pull clips from.Tween — fire-and-forget procedural interpolation in code (create_tween()); ideal
for UI pops, fades, and one-off moves.AnimatedSprite2D + SpriteFrames, or keyframe the
frame property in an AnimationPlayer.AnimationPlayer, then add an AnimationTree
(active = true), set its anim_player, and design an AnimationNodeStateMachine or
AnimationNodeBlendSpace2D as the tree root.travel) or by setting blend
parameters.animation_finished signal and call/method tracks.@onready var anim: AnimationPlayer = $AnimationPlayer
func attack() -> void:
test cases passed, vs 21 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.