0 votes

Hi All,

I have a working solution to this issue, but I am mostly concerned about the scalability of my solution. I am using a Navigation2D object for pathfinding in my game, and one of the obstacles my NPCs might have to navigate around are doors that are locked or unlocked. The NPCs are easily capable of navigating unlocked doors, but I had some trouble getting them to recognize locked doors. My solution was to break up my navigation polygons into one for each individual room, and then give each lockable door its own navigation polygon. Then, I add the navigation polygon as a child of the Navigation2D if the door is unlocked and I remove the navigation polygon as a child of the Navigation 2D if the door is locked. Is this a viable solution if I anticipate having a maximum of maybe 30ish rooms in a level? If not, is there a better way to implement doors inside of a Navigation2D?

in Engine by (31 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.