Door animation,

Hello, this is my first post.

I created an animated object in Blender and imported it into UE5. I managed to set up the animation as follows:

  • When I press E, the first half of the animation plays, and the doors open.
  • When I press E again, the second half of the animation plays, and the doors close.

This works fine unless I press E in the middle of the opening animation. When that happens, the animation is interrupted, and the second part plays immediately.

Ideally, the first part of the animation shouldn’t be interruptible—it should play to the end even if the player presses E. Only after the first animation has finished should pressing E trigger the closing animation.

Another issue I’m facing is setting up a collision so that the player can’t walk through the doors.

Any advice would be greatly appreciated!
this is a blueprint setup

Hello! That should be easy to accomplish by having a new bool state variable.
You can create a new boolean variable named “IsInteractingWithDoor”.
In the E key event, first check if this variable is true, in that case do nothing. If it’s false, set it to true and then do the rest of your nodes.
Right after the Stop node, set that variable back again to false.

You can use a Do Once node and reset it once the animation is completed :blush:

(A little more practical way than what @NLaurito has suggested, I also used to do that before knowing the existence of that node. But it’ll function the same.)

Also, you can use a Flip Flop node to reduce your current blueprint code by half! As it eliminates the need for the current bool type variable you have, along with separate inputs.

As for collision, make sure that the object response for pawns is set to block and to set up collisions, you can double click on your mesh, and from the Details window there, under the Collision section, select the Use Complex Collision as Simple from the dropdown menu next to the Collision Complexity setting. And also tick the checkbox next to the Customized Collision setting. Even though I didn’t experience any issues with that collision setting myself, I heard some issues with it but I think it’d be appropriate in this case.

Hope this helps! :innocent:

Thanks for the quick reply! I don’t want to sound picky, but could you draw for me how I should connect this new boolean? If yes that would be a massive help for me.
thanks

Sure! It would be something like this:

You can also do it the way @VisAgilis mentioned. The implementation is shorter, but since the current state remains hidden inside the DoOnce node, you may need to refactor it later if you want to expand upon this system and have access to this variable from elsewhere. It’d be something like this:

Any of these two solutions should work for this scenario you have right now

The “Do Once” node is working perfectly! :slightly_smiling_face:
I didn’t realize I could connect Stop output to Reset input

1 Like

Hi, thanks for the advice! I found the settings you mentioned and think I set them up correctly, but there’s another issue.

Now my character can’t pass through the door when it’s closed, but also can’t pass through when it’s open.
UnrealEditor2025-01-2420-47-26-ezgif.com-video-to-gif-converter

Thats my seetings for box collision in psychic assets . is there a possibility that this door are to narrow ? When they are fully open . and box is holding player back ?

What happens when you reduce the capsule radius of the player character?

Ok i think , maybe I use wrong bones for box collider


I added it to RootNode

But When I try added it to Door_RH. I can’t scale the box any further—this is the minimum size I can get.

Ignore the box scale issue . wrong bone and size.
I’ve already fixed it. Adjusting the player collision shape was a great suggestion—after resizing it, everything works fine.

It’s been a long day for me. Thanks for your help! :blush:
gif2