# How can my NPCs open doors?

**URL:** <https://forums.unrealengine.com/t/how-can-my-npcs-open-doors/293593>\
**Category:** AI\
**Tags:** npc, unreal-engine, navmesh, Blueprint, question\
**Created:** [September 13, 2014, 8:56am UTC](https://forums.unrealengine.com/t/how-can-my-npcs-open-doors/293593 "2014-09-13T08:56:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_a2737234](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a2737234](https://forums.unrealengine.com/u/anonymous_user_a2737234)\
**Post date:** [September 13, 2014, 8:56am UTC](https://forums.unrealengine.com/t/how-can-my-npcs-open-doors/293593/1 "2014-09-13T08:56:45Z")

</div>

Hello,

I have npcs with an AIController with a behaviour tree and a mansion where they are walking in. Normally they stay inside their assigned room but when they are scared they should run to a savepoint which is located in the basement. Players can open and close doors. When the doors are open it is no problem and they find their way to the savepoint but when the door is closed they just run in the direction of the save point and get stuck on the wall.

I guess I could write my own navigation system where the NPCs can look up which door connects which rooms and than choose the shortest path but it would be easier if there is some way of getting the desired behaviour (NPCs opening doors) with the nav mesh that is provided by the engine.

Thanks in advance for any tipps on how to solve this 🙂

---

<div class="post-metadata">

**Author:** ![Erasio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Erasio](https://forums.unrealengine.com/u/Erasio)\
**Post date:** [September 13, 2014, 12:29pm UTC](https://forums.unrealengine.com/t/how-can-my-npcs-open-doors/293593/2 "2014-09-13T12:29:38Z")

</div>

I don’t believe there is an really easy way with the navmesh. Maybe a Nav Link Proxy could help but as far as I read thus far it only allows you to jump off a ledge for example.

I didn’t watch those but maybe the first two of those video tutorials about AI contain what you need. At least it sounds like it:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [September 13, 2014, 1:27pm UTC](https://forums.unrealengine.com/t/how-can-my-npcs-open-doors/293593/3 "2014-09-13T13:27:44Z")

</div>

Hm, i just think about saving the doors somewhere.  
The Navigation mesh could be used for the movement inside a room.  
You just need to have a way to save the rooms and the doors, so that  
the NPC knows where he is.

It’s like a list that the NPC needs to go through.

Room 1 is the savepoint. He is in Room 5. So he has a list of Rooms  
and doors. He knows that Room 5 has 2 doors, one to Room 3 and one  
to Room 4. Room 3 has a door to Room 2 and this one a door to Room 1.

So now you need to think of a way to go through this list and give the  
NPC the order to move to the Door. Opening it is the easy thing. Just make  
a Collision Box or something that fires on colliding with the NPC and opens the door.  
You can call a delay if the NPC leaves the door collider. This can close the door automaticaly.

The List would be an array of a struct. That struct has the RoomName and a second array of  
door names/positions. If the NPC is in a room, you can have a collider here as well that  
detects the NPC or maybe that the NPC detects the room and sets the current room  
to the one hes in. So than he knows where he is and what doors are in the room.

It’s a bit complicated and i don’t know if there is an easier, more dynamical way.

---

<div class="post-metadata">

**Author:** ![Erasio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Erasio](https://forums.unrealengine.com/u/Erasio)\
**Post date:** [September 13, 2014, 3:26pm UTC](https://forums.unrealengine.com/t/how-can-my-npcs-open-doors/293593/4 "2014-09-13T15:26:18Z")

</div>

Well using an approach with doors you could do something like ignoring the door in the navmesh or use a NavLinkProxy near the door to symbolize that there’s a way through. Open the door in its own blueprint and the standard pathfinding algorithm will do the rest.

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [September 13, 2014, 3:57pm UTC](https://forums.unrealengine.com/t/how-can-my-npcs-open-doors/293593/5 "2014-09-13T15:57:29Z")

</div>

Yep, like i said, i didn’t know that you can solve it dynamical. If there is something like a NavLinkProxy, than it will be easy for the OP.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a2737234](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a2737234](https://forums.unrealengine.com/u/anonymous_user_a2737234)\
**Post date:** [September 14, 2014, 8:11pm UTC](https://forums.unrealengine.com/t/how-can-my-npcs-open-doors/293593/6 "2014-09-14T20:11:48Z")

</div>

Yes, NavLinkProxys are the way to go. Didnt know such a thing exists. Thanks!

---

<div class="post-metadata">

**Author:** ![WrATHZer0](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wrathzer0/32/1139528_2.png) [@WrATHZer0](https://forums.unrealengine.com/u/WrATHZer0)\
**Post date:** [February 10, 2026, 10:32am UTC](https://forums.unrealengine.com/t/how-can-my-npcs-open-doors/293593/7 "2026-02-10T10:32:07Z")

</div>

This is just what I was looking for wondering why my NPCs don’t use doors, because the nav mesh is broken between the joining rooms, NavLinkProxy works!
