Playing Animation Asset forwards and backwards

Hello all,

I’ve designed a custom door with animation in Blender and I’m trying to play it forwards opening and closing with the animation in backwards. I’ve tried this code setting the Play Rate of my Skeleton Mesh Component to 1 and -1, but the animation is playing always in forwards.

Anyone has any ideia to solve this?

Thanks in advance!

The set play-rate is setting the speed at which the animation is playing. You can’t invert it to play it backwards. Instead you need to either create a reversed animation, and play that. I am unsure if there is a node to reverse the animation for you.

Unless there’s a very complex animation that needs to play when the door is opening, I would just use a timeline to open the door by connecting on BeginOverlap on Play from start and close the door when EndOverlap connected to Reverse from end.
I would also add a check ( using a boolean ) that make sure that the door fully open when you overlap and won’t reverse the animation if the animation hasn’t finished playing when you EndOverlap.

If instead you want to use an animation, I would suggest to use and AnimBP, where you can right click onto an animation clip inside the AnimGraph > Convert to single frame animation.
The explicit time float allows you to set a value for the plating of the animation, so you can use also a timeline that can go backward/forward based on the Begin/EndOverlap events.

1 Like

Your idea gave me a insight, I was able to reach what I wanted without using an AnimBP.
I just copied my animation’s max position and configured the Timeline node with this value, connecting it to a Set Position node. It works perfectly, and I can even slow down or speed up my animation.

I’m marking this comment as the solution for others that may have the same issue, thank you very much!

1 Like