Animation Error | "[texture] must have at least one key to cache for blending."

Godot Version

Godot 4.2.1


I’ve been getting this error when playing animations:

E 0:00:01:0294   _update_caches: AnimationMixer: 'playerWalkSide', Value Track:  'Sprite2D:texture' must have at least one key to cache for blending.
  <C++ Error>    Condition "anim->track_get_key_count(i) == 0" is true. Continuing.
  <C++ Source>   scene/animation/animation_mixer.cpp:659 @ _update_caches()


	func _physics_process(delta):
	velocity = Vector2(0,0)
	if Input.is_action_pressed("left"):
		velocity.x -= speed
		$Sprite2D.flip_h = true
		lastKeyPressed = "left"else:
       # Other if statements

From what I read from the error, I might be missing something relating to cache, though I am unsure on what that is. How can I fix this?

(P.S. It’s my first forum post, sorry for any missing necessary information and other mistakes.)

The problem is related to “key” frames. The animation track for the sprite2d has a blending option enabled, but no direction on how to blend without the key frames.

You need to look at the animation panel

Thanks for this. I fixed the issue by deleting unused animation tracks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.