# How to check if AI path is valid (i.e. AI can reach target)?

**URL:** <https://forums.unrealengine.com/t/how-to-check-if-ai-path-is-valid-i-e-ai-can-reach-target/460555>\
**Category:** AI\
**Tags:** pathfinding, unreal-engine, path, CPP, question\
**Created:** [January 14, 2020, 12:51pm UTC](https://forums.unrealengine.com/t/how-to-check-if-ai-path-is-valid-i-e-ai-can-reach-target/460555 "2020-01-14T12:51:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirtInfestor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dirtInfestor](https://forums.unrealengine.com/u/dirtInfestor)\
**Post date:** [January 14, 2020, 12:51pm UTC](https://forums.unrealengine.com/t/how-to-check-if-ai-path-is-valid-i-e-ai-can-reach-target/460555/1 "2020-01-14T12:51:47Z")

</div>

Hi,

So here is the basic problem i am currently facing: I am spawning AI enemies that should walk to a certain location. The player can however build obstacles that can make this way longer. If the player now makes it impossible for the AI to reach its target, the enemies are allowed to destroy the obstacles. How can i solve this?

---

<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:** [January 15, 2020, 10:13pm UTC](https://forums.unrealengine.com/t/how-to-check-if-ai-path-is-valid-i-e-ai-can-reach-target/460555/2 "2020-01-15T22:13:23Z")

</div>

[https://answers.unrealengine.com/questions/471064/how-to-check-if-a-point-is-reachable-by-pawn.html](https://answers.unrealengine.com/questions/471064/how-to-check-if-a-point-is-reachable-by-pawn.html)
