0 votes

Hey there! I'm using navpolys (2D) to make use of Navigation2D. I managed to make the entities avoid walls by restricting the boundaries of the navpoly so theres plenty of room for the characters to move around, but I'm having trouble getting them to avoid other solid objects in my world (ie, crates) with collision shapes.

Has anyone developed a work around or implementation to correct this behaviour? All input would be greatly appreciated!

in Engine by (45 points)

are these "other solid objects" generated on runtime or are they created with the editor?
afaik they wont work when created on runtime

can you show us your scene hierarchy?
if i remember correctly collision shapes must be childs or grandchilds of the navigation node. if they are deeper they will get ignored.

They are nodes instanced then added as children at runtime, but not to the Navigation 2D node. (Ie enemies who spawn into the map)

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.