I'm trying to make an agent patrol around a maze. The maze is proceduraly generated and consists of many rooms connected with doors. The problem occurs when the agent reaches a door. I wrote a script where if the agent gets near a door, the door opens, but the results are bad because the doors are walkable, so the navmesh doesn't consider them as obstacles and the agent gets stuck if the door opens and gets in its way.
I've been looking everywhere on the internet, but haven't found a solution. If anyone has an idea or a way to make this work, I'll be very thankful.