Search code examples
unreal-engine4

Trigger box edge triggers beginning and ending timelines


I am making a game and I want door to open when I enter trigger box and close when I am exiting it.

The blueprint of the door

The timeline of door sliding(both enter and exit use same timeline just exit uses reverse)

When I am at the edge of the trigger box, it just glitches and cannot decide if the door should close or open. Is there a way to put a deadzone or some kind of filter to prevent this from happening?

Thanks!


Solution

  • It would seem to me that at least part of the problem is that you have two timelines fighting each other.

    It makes more sense to have a single timeline, and play it to open the door and reverse it to close the door.

    So, delete everything after the bottom overlap event and instead run its execution pulse into the 'Reverse' input of the timeline at the top.

    You should also use the Play input on the top timeline instead of the PlayFromStart input. Otherwise, if the door is still closing when you re-enter the trigger box, it will suddenly jump to the closed position to play the opening animation from the start.