Skip to content
Skills Library
Programming · Building & coding

animation

/animation

Create and manage animations in Godot using AnimationPlayer, AnimationTree, Tween, and AnimatedSprite2D. Use this skill when building character animations, UI transitions, sprite frame animations, tween-based effects, or animation state machines.

Repository
skills ↗
Licence
MIT
Last repository change
18.06.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 18.06.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Create and manage animations in Godot using AnimationPlayer, AnimationTree, Tween, and AnimatedSprite2D. Use this skill when building character animations, UI transitions, sprite frame animations, tween-based effects, or animation state machines.

Original author description

Create and manage animations in Godot using AnimationPlayer, AnimationTree, Tween, and AnimatedSprite2D. Use this skill when building character animations, UI transitions, sprite frame animations, tween-based effects, or animation state machines.

How it works

  1. AnimationPlayer
  2. Tween Animations
  3. AnimatedSprite2D
  4. AnimationTree
  5. Best Practices
Original SKILL.md headings · 145 lines, 334 words
SKILL.md preview
---
name: animation
description: Create and manage animations in Godot using AnimationPlayer, AnimationTree, Tween, and AnimatedSprite2D. Use this skill when building character animations, UI transitions, sprite frame animations, tween-based effects, or animation state machines.
metadata:
  author: godot-dev
  version: "1.0"
---

# Animation System

## AnimationPlayer

### Basic Setup

```gdscript
extends Node2D

@onready var animation_player = $AnimationPlayer

func _ready():
    animation_player.play("walk")
    animation_player.play("run", -1, 2.0)  # name, blend, speed

func _process(delta):
    if animation_player.is_playing():
        print(animation_player.current_animation)
```

### Animation Callbacks

```gdscript
func _ready():
    animation_player.animation_finished.connect(_on_animation_finished)
    animation_player.animation_started.connect(_on_animation_started)

func _on_animation_finished(anim_name: String):
    if anim_name == "attack":
        state = IDLE

func _on_animation_started(anim_name: String):
    print("Started: ", anim_name)
```

## Tween Animations

### Basic Tween

```gdscript
extends Node2D

func _ready():
    var tween = create_tween()
    tween.tween_property(self, "position", Vector2(100, 0), 1.0)
    tween.tween_property(self, "modulate:a", 0.0, 0.5)
    tween.tween_callback(queue_free)
```

### Tween Options

```gdscript
func animate_with_options():
    var tween = create_tween()
    tween.set_ease(Tween.EASE_IN_OUT)
    tween.set_trans(Tween.TRANS_CUBIC)

    # Parallel animations
    tween.tween_property($Sprite, "position", Vector2(100, 0), 1.0)
    tween.parallel().tween_property($Sprite, "modulate", Color.RED, 1.0)

    # Looped tween
    tween.set_loops(3)
    tween.tween_interval(0.5)
```

### Common Tween Patterns

```gdscript
# Fade in
func fade_in(node: CanvasItem, duration: float = 0.5):
    node.modulate.a = 0.0
    var tween = create_tween()
    tween.tween_property(node, "modulate:a", 1.0, duration)

# Fade out
func fade_out(node: CanvasItem, duration: float = 0.5):
    var tween = create_tween()
    tween.tween_property(node, "modulate:a", 0.0, duration)

# Scale bounce
func bounce_scale(node: Node2D):
    var tween = create_tween()
    tween.tween_property(node, "scale", Vector2(1.2, 1.2), 0.1)
    tween.tween_property(node, "scale", Vector2(1.0, 1.0), 0.1)

# Move to position
func move_to(target: Node2D, destination: Vector2, duration: float):
    var tween = create_tween()
    tween.tween_property(target, "position", destination, duration)
```

## AnimatedSprite2D

```gdscript
extends CharacterBody2D

@onready var animated_sprite = $AnimatedSprite2D

func _physics_process(delta):
    if velocity.length() > 0:
        animated_sprite.play("walk")
        animated_sprite.flip_h = velocity.x < 0
    else:
        animated_sprite.play("idle")
```

## AnimationTree

### State Machine

```gdscript
extends CharacterBody3D

@onready var animation_tree = $AnimationTree

enum State { IDLE, WALK, RUN, JUMP }
var current_state = State.IDLE

func _ready():
    animation_tree.active = true

func _physics_process(delta):
    animation_tree.set("parameters/Idle/blend_position", velocity.length())
    animation_tree.set("parameters/Walk/blend_position", velocity.length())

    if is_on_floor():
        if velocity.length() > 0:
            current_state = State.WALK
        else:
            current_state = State.IDLE
    else:
        current_state = State.JUMP
```

## Best Practices

1. **Use AnimationPlayer for complex sequences**: Key multiple properties
2. **Use Tween for simple one-shot animations**: Position, scale, fade
3. **Use AnimatedSprite2D for frame-based sprites**: Character animations
4. **Use AnimationTree for blending**: Character movement states
5. **Named animations**: Use descriptive names ("attack", "walk", "idle")
6. **Animation callbacks**: Use signals for game logic tied to animations

Versions

RepositoryScoreLicence
This page · leex852/skills100MIT
MictlanLabs/Daz3D-MCP100Apache-2.0
nimbalyst/nimbalyst95MIT
itsmesarath/blender-master90MIT

Database snapshot: 13.11.2026 · package version 3122f98dc232 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90godot-animation-workflow
    Use when the task is to create AnimationPlayer and AnimationTree state transitions.
  • 100animation-system
    Use when implementing animations — AnimationPlayer, AnimationTree, blend trees, state machines, sprite animation, and code-driven animation
  • 100animation-system
    Use when implementing animations — AnimationPlayer, AnimationTree, blend trees, state machines, sprite animation, and code-driven animation
  • 100godot-animation
    Animate in Godot 4.7 three ways: AnimationPlayer for keyframed clips (incl. Call Method tracks), AnimationTree with state machines and blend spaces for character animation, and Tween for short procedural/UI tweens via create_tween(). Use when working with…
  • 95godot-setup-animationtree
    Use when setting up AnimationTree nodes for state machine-driven animation, creating AnimationNodeStateMachine graphs, configuring BlendSpace2D/3D for locomotion blending, implementing state transition conditions, or creating animation blend trees for complex animation mixing.…
  • 85animation-review
    Reviews Godot Animation implementation for known pitfalls. Triggers AFTER implementation, when code involves AnimationPlayer, AnimationTree, AnimatedSprite2D, SpriteFrames, AnimationNodeStateMachine, BlendSpace, OneShot, callback_mode_process, or animation playback control…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.