# Detect if player is inside Area of Effect?

**URL:** <https://forums.unrealengine.com/t/detect-if-player-is-inside-area-of-effect/236924>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [June 23, 2021, 4:46am UTC](https://forums.unrealengine.com/t/detect-if-player-is-inside-area-of-effect/236924 "2021-06-23T04:46:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 23, 2021, 6:47am UTC](https://forums.unrealengine.com/t/detect-if-player-is-inside-area-of-effect/236924/2 "2021-06-23T06:47:03Z")

</div>

Have a look at how dot product works:

> [@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…

Seems like the way to do here.

> (rainbows/cones/donuts/etc)

- cone is just a dot
- rainbow would be dot and min | max range
- donut is checking whether the target is in min | max range

> What I’m struggling with is finding a way to detect whether or not the player is standing inside an AoE.

If you do not want to create uniquely shaped colliders, you’ll need to math it out. Sphere overlap nearby targets and then iterate to check whether they meet other criteria like the min range (donut hole) or dot product (cone).

---

_[View the full topic](https://forums.unrealengine.com/t/detect-if-player-is-inside-area-of-effect/236924)._
