0 votes

So i wanted to animate a player with animation player, and on the sprite i can only set one image, that's the idle one, so when the player is standing still there's this simple animation, however I wanted to add more animation to it, like running, jumping and so, nut i have different png files for everything. On the documentation and on some tutorials i only saw animation with AnimationSprite where i insert every frame, but that's not in my case. And AnimationPlayer where there is used only one png file which has all the animations on Vertical frames, in my case i don't have vertical frames, only one horizontal, and i have more png files with horizontal frames.

Do you know any way possible to add more png files to the sprite and animate them with animation player, or any other way that doesn't require me to modify my png files into one, that has all frames?

Animation 1: idle
Animation 2: Run

in Engine by (14 points)

Hi! you can't add more than one texture to the sprite, but you don't need to. You can just animate the sprite texture property to change the texture on each animation. At the beginning of the animation, assign the new texture to the sprite, and click the key icon beside the texture property so the animation changes the texture.

Thank you so much, this was helpful! If someone runs into the same problem you should also press the key next to the horizontal frame because if you have images with less/more frames and you don't key it, it modifies all you animations with the current one you are using.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.