Animating a door trough a colider

Hello there guys!

I have already done this in Unity… and now I’m thinking on how to do it in Unreal with Blueprints.

I have a big door. I will add a collider… and when the player enters that collider the door will start the Opening Door Animation.
My problem actually is… how do I do the animation? Like I actually have to make it myself. I need a thing to rotate… then the left door go left… right door go right.

What should I do exactly? Is Matinee still active? Someone told me that it’s Legacy.

Thanks

P.S. Just to be clear, I need to know how to do the animation, but also to trigger the animation from a blueprint <3

Hello, first of all you will need a trigger box, so when the player enters the box, the door will open. The way I do doors is using a timeline. Take a look on YouTube or wiki to see how timelines work, you shouldn’t have any problems.

Timeline is that node I was thinking when I said “trigger”. I know how to make the trigger itself, that’s not an issue.
My main problem is how to animate it and see what I animate. Basically I want to rotate & move on the X axis an object. Then I want 2 objects to move on the Y axis. In Unity it was easy because I had the Animation Window and I could see my object… and I could select items to animate on the timeline. I could just select an object… move later in time… rotate it to a new value… and then click Play and see the actual animation.

I don’t think you can see what you animate but don’t worry it’s not hard. The first step is to select the door(s) and get their Y axis when they are closed. If you have 2 doors make 2 vectors in the timeline, and on time 0 set their Y to the correct number(the Y when they are closed). Then move the doors where you want them to go, (like +100 or -100 etc), and add it to the timeline on time 1s(or whatever u want, depends how fast you want the doors to open/close). After that reset the Y axis on the object, and the main part is done. Then you can make an event and connect it to “Play” to open the door. Make one more event to close the door, and connect it to Reverse. On the Update node, use Set Relative Rotation node to rotate the objects. Then give it a try in game :slight_smile:

You do have some good points, but I think what I need is the Sequencer and not the Timeline. Timeline is good on other stuff… what I need is kind of a custom animation that needs to look right.
Not only that but my object is part of a Blueprint, so I coudn’t use the Matinee. With the sequencer I can see the Actors from inside the BP.

So basically after I do the animation then I will try to trigger it when I go in a collider… or press a button.

Hi,

If importing the animations isn’t an option, then I agree with @DjSt3rios, I think Timelines would be the easiest option in this situation. I’ve set up a small example for you, the event should be executed when the trigger box is overlapped:

Here is a screenshot of the Timeline:

In this case, I’ve set up a 2 seconds long Timeline that increases a float called ‘Alpha Value’ from 0 to 1, over the course of that 2 seconds. This ‘Alpha Value’ is then used to linearly interpolate (using the ‘Lerp’ node) between the relative locations of the ‘closed’ and ‘open’ door states (in this case I’ve used +300/-300 ‘X’ offsets for the doors).

Basically, that’s it! I’ve created this in a new Actor Blueprint, might be a good idea if this door construction will be used multiple times in the game.

Hope this will help you out a bit.

The thing is that the animation itself is more than moving the door left/right. It’ also a know rotating fast…then going in…then the left side of the door starts to go… right one starts to go…then the back segment from the doors start to go, etc. It’s a big blast door :smiley: But the screenshots are useful anyway because I think I can use them for something else.