This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

Navigation2D with corner avoidance?

agameraaronagameraaron Posts: 27Member
edited May 2017 in Programming

Using navigation2D my creatures are predictably getting stuck before corners because of their pushboxes getting caught on the wall along the way. Anyone know how to enhance navigation paths (using navigation polys) so that entities following it will stay further away from walls as shown in the first portion of this video?: The source code seems to be made with 3D in mind & I'm a bit clueless where to look among it all. Seems this was just one part of their FPS project. Here's a link to it:

Hoping someone can clarify how I might go about this with kinematic bodies in 2D. Thanks in advance!

Tags :


  • agameraaronagameraaron Posts: 27Member

    I implemented Karroffel's suggestion of simply shrinking the navigation mesh away from the walls (especially enclosing corners). It works well enough for my needs.

  • SalamiSamSalamiSam Posts: 20Member

    This was quite a while ago, but for anyone else running into this issue, I found that my map's mesh instance/geometry must be scaled to 1.0 in order to work properly. That seemed to resolve the issue.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.