# How to AI select path safer/far from player?

**URL:** <https://forums.unrealengine.com/t/how-to-ai-select-path-safer-far-from-player/407510>\
**Category:** AI\
**Tags:** Behavior-Tree, pathfinding, Environment-Query, unreal-engine, question\
**Created:** [October 20, 2017, 2:15pm UTC](https://forums.unrealengine.com/t/how-to-ai-select-path-safer-far-from-player/407510 "2017-10-20T14:15:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vaheva](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vaheva/32/963466_2.png) [@Vaheva](https://forums.unrealengine.com/u/Vaheva)\
**Post date:** [October 20, 2017, 2:15pm UTC](https://forums.unrealengine.com/t/how-to-ai-select-path-safer-far-from-player/407510/1 "2017-10-20T14:15:46Z")

</div>

Hello  
I have simple covering system EQS Query based. It working - ai can find and go to cover/safe place. However AI selecting mostly path near player even, when path is not best (cost etc), where should select more safe path even when bigger cost.

Here sketch:

 ![217362-ai-better-path.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/1/a11c4644b31cb5a48e66a8c917289a55b21903da.jpeg)

Ai (green) should take green path instead of red one. This is not exactly AI behavior, but I think good showing problem.

Than’s for any help!

---

<div class="post-metadata">

**Author:** ![Vaheva](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vaheva/32/963466_2.png) [@Vaheva](https://forums.unrealengine.com/u/Vaheva)\
**Post date:** [November 20, 2017, 11:15am UTC](https://forums.unrealengine.com/t/how-to-ai-select-path-safer-far-from-player/407510/2 "2017-11-20T11:15:49Z")

</div>

bump - mission impossible?

---

<div class="post-metadata">

**Author:** ![Zodi\_X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zodi\_X](https://forums.unrealengine.com/u/Zodi_X)\
**Post date:** [July 27, 2022, 6:30am UTC](https://forums.unrealengine.com/t/how-to-ai-select-path-safer-far-from-player/407510/3 "2022-07-27T06:30:55Z")

</div>

Go any answers?

---

<div class="post-metadata">

**Author:** ![Vaheva](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vaheva/32/963466_2.png) [@Vaheva](https://forums.unrealengine.com/u/Vaheva)\
**Post date:** [July 27, 2022, 9:14pm UTC](https://forums.unrealengine.com/t/how-to-ai-select-path-safer-far-from-player/407510/4 "2022-07-27T21:14:42Z")

</div>

Nope. I drop this project, working now on multiplayer without bots, but I will back to this and see changes in ue5. This was some older ue4 version. As I remember I not solved this.

---

<div class="post-metadata">

**Author:** ![eblade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eblade](https://forums.unrealengine.com/u/eblade)\
**Post date:** [August 6, 2022, 6:27am UTC](https://forums.unrealengine.com/t/how-to-ai-select-path-safer-far-from-player/407510/5 "2022-08-06T06:27:25Z")

</div>

What I would do is put a fairly sizeable sphere component on my playercharacter that is a dynamic navmesh obstacle, and set it up to have an Area that significantly increases pathing cost in that radius around the player.

As is, though, the diagram doesn’t make much sense, unless the player is somehow _decreasing_ the path cost in that area.
