# How do I trigger an event on a single axis?

**URL:** <https://forums.unrealengine.com/t/how-do-i-trigger-an-event-on-a-single-axis/236192>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [June 18, 2021, 6:15pm UTC](https://forums.unrealengine.com/t/how-do-i-trigger-an-event-on-a-single-axis/236192 "2021-06-18T18:15:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 19, 2021, 9:56am UTC](https://forums.unrealengine.com/t/how-do-i-trigger-an-event-on-a-single-axis/236192/5 "2021-06-19T09:56:09Z")

</div>

> [@Demrok](#):
>
> I have never used/seen a dot product in any of the tutorials I’ve done!

Here’s a visualisation - the last image:

> [@How to create God of War targetting system?](https://forums.unrealengine.com/t/how-to-create-god-of-war-targetting-system/210302/2):
>
> [The Dot Product](https://en.wikipedia.org/wiki/Dot_product) of 2 directional vectors will be in range of -1 to 1. Anything that’s above 0 is in front of you, anything below 0 is behind (and every other value in between matters, too!) I grab all the actors around the player using a Sphere Overlap (as in the original suggestion) and loop through the elements of the array, checking my angles - Dot player’s forward and the direction to each target. For dot values greater than .5 I mark the target, and add that actor to the array…

---

_[View the full topic](https://forums.unrealengine.com/t/how-do-i-trigger-an-event-on-a-single-axis/236192)._
