I am new in godot and I have simple project like that as I added, and as you saw in screenshot here:
have circle-two.png and when I start to project I want circle-two.png to be animated in the center of circle-one.png, I was used AnimationPlayer it is not work and throw error like that "Invalid call. Nonexistent function 'add_animation' in base 'AnimationPlayer'." maybe my way not correct like that, some one says use tween for that but I dont know how to apply for it, any idea will appreciated. πŸ™‚

    bluecity54 what does your code look like? It sounds like you were using a function not defined or maybe there's a syntax error in the function you wrote.

    When you have an animation player in your scene and create an animation in it, you will see little key icons next to properties of other nodes. If you click them you can add a new tracks (for example for your circle position) into your animation.

    You can also set the sprite for your yellow circle in the inspector. You don't need to do this by code. And you can also use the animation player to change the sprite if you like. Just click the key icon next to the sprite in the inspector to create another track to your animation player.

    On the right side you can set the animation time.
    Move the blue line in the animation track to your desired time select they sprite node and click on the key icon for its position to add more positions to your animation.

    Or you can click the arrow icon with A> in it to make the animation to play automatically.
    To loop an animation click the circling arrow button:

    You basically can do everything you had in your code with the animation player.

    I believe animation player does not have a function add_animation. Those animations are inside the animation players libraries I believe but I'm not sure how to use them via code.

      trizZzle did you update code again or? is it possible to send project here to see animation in inspector panel, tnx appreciatedπŸ™‚

      trizZzle by the way I used to use code in general, if I just use inspector panel how I will handle it in my code, I will it with animation name?

      Hey, sorry for the late answer.

      Unfortunately I didn't save the changed code. But I thought that instead of using the animation player you can also use tweens.

      @onready var texture_rect: TextureRect = $Panel/TextureRect/TextureRect
      var duration := 3.0
      
      func _ready():
      	var tween = create_tween()
      	tween.tween_property($Sprite2D, "global_position", texture_rect.global_position , duration)

      Maybe use a sprite2d for the blue circle too instead a texture rect. The blue circles position is offset because the texture rect seems to have a pivot point that is not in the center, but on the upper left corner.

      I meant to set the sprites texture via inspector. You set it via code, but unless you don't want to have different textures for your sprite when the scene starts you can just set it up in the inspector.

        trizZzle when I use tween I dont need use animation player as I see, tnx so much πŸ™‚