load and unload using same trigger

The easiest way to implement this while keeping your sanity in check would probably be to have a trigger blueprint that uses the difference in positions.

I would highly recommend adding an arrow component so you can tell which way the trigger box is facing when placing it.
image

This evaluates to true if in front, false if behind.
Keep the X & Y of the trigger box rotation 0. This does not work as intended with crazy rotations.


We simply find the rotation from the trigger box to the player, account for our own rotation (so we can change the Z rotation of the trigger box), and check if that angle is between -90 & 90 (0 would be facing forward, so -90 to 90 is all that’s in front of it)

It’s up to you to decide if you want to load when in front or load when behind (though I would recommend having it load whatever it’s facing), but you have to keep it consistent.

3 Likes