Can't Figure out how to make NPCs open Doors!

Hey Everyone!

I am trying to make a system where some NPCs can open doors and some other NPCs can’t.

What I want to achieve is to make the NPCs that can open doors have their pathfinding calculated beyond the door even if it’s closed, but I struggle at the part to make the door operate on both scenarios of the NPC that can open Doors and the one that cannot.

Is there a way to make NPCs that can calculate the pathfinding beyond closed doors and open them in proximity and NPCs that can’t open doors and have them as obstacles and not go beyond them?

Any suggestions would be greatly appreciated!

1 Like

first pathfind up to the enterance to the door, check if the door can be opened by that npc and if so, open the door and directly have the npc walk through without pathfinding, once clear of the door have it pathfind where it needs to go.