How do I trigger an event on a single axis?

I have googled my brains out and can’t seem to find exactly what I am looking for… Maybe I am using the wrong search terms, I’m not sure… I hate not knowing every node available to me in UE :frowning:
What I have is: A blueprint actor I can drop into the world that calls a widget on an Event ActorBeginOverlap. Works fine, easy.
What I want to do is-

Have that actor call a widget to appear on screen, but ONLY when the player character passes through on the positive X axis.
Alternatively, have the actor allow one widget called on Positive X axis and another different widget on overlap in the negative X axis…
What node should I be using inside the Actor Blueprint to make this happen?

Dot Product is by far the easiest way to check for something like that:

Considering the sphere’s front is facing north, dot product will be greater than 0 when you’re in front of it:

When the overlap happens, check the angles:

1 Like

I have never used/seen a dot product in any of the tutorials I’ve done!
Thanks for bringing this to my attention :smiley:
HAH Nevermind, I didn’t look at the second image lol
Thanks for the help! That’s exactly what I was looking for!

Here’s a visualisation - the last image:

Awesome, super handy information :slight_smile: Thanks for this!
I will probably change these pop-ups to be a one time event that grants XP and then reveals a location on the map.
But I still had to know how this could be done, especially since I could not find anything when I googled. Hopefully this helps somebody else down the road!

you should a one time trigger instead, because it will not trigger again unless another event tells it to reset. so he first time you enter an area it gets triggered, when you leave that area and activate another area’s trigger the first one gets reset, so that next time you revisit it will tell you what area you are in.
its got nothing to do with the direction that you are traveling in, although thats another way to get things done