# How can I limit the AI Perception sight height?

**URL:** <https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225>\
**Category:** AI\
**Tags:** Perception, raycasting, perception-component, unreal-engine, question\
**Created:** [June 25, 2020, 6:01am UTC](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225 "2020-06-25T06:01:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![X3cut1ona](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@X3cut1ona](https://forums.unrealengine.com/u/X3cut1ona)\
**Post date:** [June 25, 2020, 6:01am UTC](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225/1 "2020-06-25T06:01:02Z")

</div>

I am trying to limit the vertical scope of the AI Perception sight sense so when the player character is on a platform slightly above, the enemy will still not be able to detect them. Is there a specific property within the AI Perception component or the character component itself that handles that?

The other path I’m considering taking is to implement a quick cone raycast to verify that the player character is at the same level/height as the enemy, but I am looking for the most efficient solution and would appreciate the help.

Note: I am aware that the Base Eye Height can modify it to a certain extent, but I don’t believe it can do what I’m looking for.

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [June 25, 2020, 6:16am UTC](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225/2 "2020-06-25T06:16:07Z")

</div>

SetPeripheralVisionAngle can be used for that. If you test it, you will see, that is already practically a cone.

---

<div class="post-metadata">

**Author:** ![X3cut1ona](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@X3cut1ona](https://forums.unrealengine.com/u/X3cut1ona)\
**Post date:** [July 1, 2020, 5:15am UTC](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225/3 "2020-07-01T05:15:36Z")

</div>

Sorry for the late response, was just able to test it out now. Doesn’t that property only adjust how wide (from left to right) the NPC would be able to see?

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [July 1, 2020, 7:52am UTC](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225/4 "2020-07-01T07:52:14Z")

</div>

Like I said, it’s a cone. It’s the same angle in all directions.

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [July 1, 2020, 11:23am UTC](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225/5 "2020-07-01T11:23:53Z")

</div>

Test with 15º:

 ![305890-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/9/579a664c78cb97659e32287e817dd1ec1e98b667.jpeg)

Clearly, a cone.

---

<div class="post-metadata">

**Author:** ![X3cut1ona](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@X3cut1ona](https://forums.unrealengine.com/u/X3cut1ona)\
**Post date:** [July 1, 2020, 1:48pm UTC](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225/6 "2020-07-01T13:48:18Z")

</div>

Ah okay, but I’m looking to see if there’s a way to specifically limit the height. I’m fine with the width at the moment. That’s a pretty neat test setup btw!

---

<div class="post-metadata">

**Author:** ![RHIJZY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RHIJZY](https://forums.unrealengine.com/u/RHIJZY)\
**Post date:** [July 9, 2022, 7:33pm UTC](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225/7 "2022-07-09T19:33:03Z")

</div>

You can make a branch node and in it calculate if the player is eg… within one meter above or one meter below.
