Can I control door animation with Animation Sequence?

Hi, I made door animation in Blender and would like to freely control it on UE5.
This animation is a bit more complex than a simple door rotation, as it includes parallel movement of the latch, rotation of the handle, and movement of the arm of the door closer.
The door animation is controlled by bones, and the door is a skeletal mesh.

If the premise is to open and close the door to the end, there is a way to prepare two animations and control them with flip-flops, but what I am looking for is an implementation method that can switch the opening direction even in the middle of the animation.

In the case of a simple rotating animation, it is easy to implement the opening and closing of a door by controlling the angle using a timeline node, but when using an animation sequence, it is easy to just open the door, but not to close it or to switch the opening direction in the middle of the animation.

Ideally, it would be possible to give a variable to the animation and control it like a parameter, with 0 being the start position and 1 being the end position,
but I have not been able to think of a way to implement this.

I thought about using ABP, but apparently it is not suitable for use with non-Pawn Actors.

Is there a better way about this?

Hi there,

You can use an animation montage for this, the Play Montage takes a Starting Position param and a Play Rate param (which can be -1 to play backwards), and while you can stop one in progress, I’m not sure if you can get the current position before doing so (in Blueprint, anyway), but you can modify the play rate of a playing montage to reverse direction, which would suffice here.

Hope that helps, let us know how you go :slight_smile:

Thank you for your response.
I was able to reverse the animation by changing the play rate in the middle of the animation.

But another problem occurred.
When the animation is complete (i.e., the door is completely open), we need to start a new animation instead of just changing the playrate, but if we start the animation as is, the door will play in reverse from the closed state and the door will close in an instant. If you start the animation as is, the door will play backwards from the closed state and the door will close instantly.
Although it is possible to get the desired result by manually checking the length of the animation and directly entering the start position, for versatility, it is better to be able to dynamically retrieve either the length of the entire animation or the playback position.

Moreover, I have not been able to determine if the animation is complete or not.
I think it is possible to implement this for Pawn actors by receiving animation notifications from ABP, but that is not possible with regular actor BPs.

Is there a better way to receive the current position or specific timing of the animation?

Getting the current play position would be ideal for versatility, for sure, unfortunately I don’t think you can (in BP), but I could be wrong here as I have not played around with montages very much myself.

For your use case I still don’t think you need it.
To close a completely open door, just use the Starting Position parameter to set the play position to the end of the sequence, and Play Rate to -1 and go.
You will likely need your own book-keeping variables to track whether the door is closed/opening/open/closing so you know when to reverse existing or play from start forward or from end backwards.

You can add an animation notification state that is active from the beginning to the end of the animation. By accumulating the deltaTime of each frame in the tick function, you can obtain the current playback time of the animation. Within the animation notification state, you can access the Blueprint (BP) that is playing the animation, and you can use a variable to record this information. This way, you can retrieve the current playback time of the animation.


I found a function called Is playing and by combining it with a variable of type Bool that is switched by a flip-flop, I was able to determine if it is completely open (or closed).
I was able to get the animation to play from the end position by putting a very large value in the Set Position function, but I’m going to have to find a way to get the exact end position of the animation, since I don’t want to deal with meaningless values.
(And I don’t like the fact that repeat the exact same decision, so I’m looking for a way to improve this :sweat_smile:).

Thank you for your response.

Can animation notifications be used outside of ABP?
The door is not a Pawn Actor, so it is difficult to control the animation with ABP.
(because to get the owner of the animation on the ABP side, the owner must be a Pawn type)

I would like to know if there is a way to get animation notifications outside of ABP or if there is a way to control a non-Pawn Actor with ABP.