I made a shop open animation where it slides in using an animatablebody2d
And for some reason, when closing the shop, it is a lot slower than when opening it
Hi there, the reason it’s playing slower is most likely due to the fact that you are using play_backwards()
This method is a shorthand for play() with custom_speed = -1.0 and from_end = true. Which makes it go in reverse. I would wager a guess that the animation has a speed that is higher than 1 (which is why it’s slower when it closes)
This should by default set the animation speed to the reverse of what it is
I haven’t really used this before but if it doesn’t work just switch “!custom_speed” with the opposite of whatever speed you have for your animation.
Also I would suggest you name your animations and for future reference I found this solution by checking the documentation for the AnimationPlayer node. You can find this by right clicking on the node and then pressing “open documentation” in the pop up menu. And then scrolling down to the play_backwards method and reading about how it works
yes, if you go to the animatedsprite2d node and then double tap the “new animation” text that is to the left of the actual animation and then you can just type whatever you want it to be called. (and remember to replace the stringname in your code with the new name or you will get an error)