Menu
CoddyTech

AnimationPlayer

Part of the Game Feel section of Coddy's Godot journey. Lesson 20 of 23.

An animation is a motion made ahead of time, like an idle bob or a door that opens. It is kept in an AnimationPlayer node.

An animation holds tracks. Each track changes one property. Its keys are values at set times, like y = 300 at 0 seconds and y = 288 at 0.6 seconds. Godot fills in the moments between the keys.

This robot's AnimationPlayer has two animations: "bob", a hover that loops, and "hop", a jump.

$AnimationPlayer.play("bob")

The name must match exactly, capitals included. A looping animation plays until you play another one or call stop().

challenge icon

Challenge

Easy

When the game starts, play the robot's "bob" animation.

Try it yourself

extends Node2D

func _ready():
	pass
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Game Feel

Practice on your own: Godot playground