Making an object move on a trigger

I’m trying to do something very simple; I want a door object in my scene to move up a set distance when you get within a certain radius of it, let’s say 2 metres in-engine terms.

This is my first attempt at bliueprints and a lot of the forums/other help I’ve seen have been very example-specific so they don’t really help me.

Thank you.

Hello,

Make a blueprint class and add your door and a box collision (to use as a trigger). Then you can “animate” the door with a timeline node. I have some screenshots from something I did a while back:

This is the door setup with a triggerbox (box collision called Trigger). The component I want to move is selected in this screenshot:

In this blueprint I use a timeline node (DoorMovement) to do the actual move. I also store the start location at BeginPlay. Then I use SetWorldLocation to update the position of the door.

If you double click on the timeline node you can set up a curve describing how the door is to move. Mine moved down so I have the curve for the Z axis start at 0 and end at a negative value. In my example I use an external curve but you can also create a new curve in the timeline (add vector track).

I hope you can use this as a starting point!

try this… Opening Doors | Unreal Engine Documentation

updated link to above link that is no longer working.