0 votes

i know there's the play backward method, but i want to reverse the animation and save it, not just play in backwards by calling a method. is that possible?

in Engine by (34 points)

1 Answer

0 votes

Yup. The best way to handle animations is to make an AnimationTree. You can then go ahead and make a node setup. Personally I do the node setup like this:

animation -> TimeScale -> Seek -> Output

If you have more than one animation then you can add a Blend2 and flick between them. I recommend adding a script to the AnimationTree with methods calling these nodes so it's all nicely self contained. To send the animation backwards you just need to set the TimeScale to -1 and it will run backwards. The seek is there for convenience to handily reset the animation to the start by entering 0 and otherwise defaults to -1/false not interfering.

See the docs for a full explanation on how to call the nodes. It's very straightforward.

Hope that helps.

EDIT: Oh, hold on you said you don't want to call a reverse method... I don't get the "why" of this at all but ok. Then, what can I say? Make an animation in reverse. But you still need a method to call that... Honestly, I'm baffled why calling a reverse method isn't good for you. How can you run an animation without calling a method? I'm confused. Anyway there's no way to flip an animation that I know of other than duplicating it and swapping the keys.

by (813 points)
edited by

this was helpful, thank you:)

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.