• RuntimesUnreal
  • Play animation reverse

Good night.

Faced with such a task, please tell me how to solve it better.

For example, there is an animation of opening a box, in the game you need to click, then the box starts to open, but if you stop, then it should close.

I could control the animation playback speed, depending on the click level, but how do I switch to closing in the middle of the opening animation?

If it were possible to change the direction of animation playback, then the task would probably be solved.

The example with the box is just for clarity.

You have already helped me with additional functionality and added a node to the blueprint to get the coordinates of the bone, I am very grateful.

I work at UE on blueprint.

Thank you for your help, I am happy to use your wonderful and convenient program every day)

Related Discussions
...

To play an animation in reverse in Spine, you can use a few different methods. In the editor, you can manually reverse an animation by selecting all the keyframes in the dopesheet, dragging the left side of the selection past the right side, and then moving the keys back to the start. This effectively reverses the animation. At runtime, you can control the playback direction by adjusting the animation time manually. In Unreal Engine, you can use blueprints to control the animation playback speed and direction. You can set the animation to play backward by specifying the time from the animation's duration to 0. This allows you to smoothly transition from opening to closing the box by reversing the animation when needed.

Thanks for the information.

I made a test example, the animation runs for 1 second, and in the middle I change its direction using the scale time node.