+1 vote

Hi!

I made a simple animation in the animation player and when I play the animation it works but when I run the preview it doesn't play the animation.
So here is my question: do I have to put the animation scene in the aoutoload or attach a script to the animation player with the appropriate code in it or how do I get it to play in the preview of the scene? And if I have to write a code to get it working what do I have to write?
I hope someone can explain me and help me solve my problem.

Thanks in advance!

Godot version 3.3.3
in Engine by (19 points)

1 Answer

+1 vote

First of all, do you only have an animation player in your scene ?

Animation player works with a SpriteSheet ideally, on a Sprite Node.

If you only have one animation, you could use an AnimatedSprite instead. It's simplier to use, but you have less control over it.

You can also use AnimationTree to append animation together, but that's only if you have multiple animations.
https://kidscancode.org/godot_recipes/animation/animation_state_machine/

This one is for AnimationTree.

by (82 points)

Here is my scene structure

This is my scene structure:

This is what happening:
https://imgur.com/SD923Nn

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.