I baked a navmesh that has a building with a closed door that can be opened. however if i make the door static then the NPC can’t enter when the door is opened. likewise, if I don’t static the door, the the NPC will just walk through a closed door. is there a way that I can do this so that the NPC can enter when the door is opened and not when closed?
Dynamic obstacles are made for this - sadly it’s only available in unity pro. You can do it by hacking though.
For example. Store each door’s state in their house’s script, when an AI is trying to access the building, loop through the doors and see if any of them is open - if so, set a waypoint there, and then to the desired location in the house. If none of them are open, do nothing/something else. This way you have to build the navmesh without the doors of course.
Navmesh obstacle… that is the answer.