Replies: 4 comments 2 replies
-
This is definitely something that is needed in engine for 2D as it's 3D counterpart already has a working implementation. There are currently a handful of plugins that attempt to address this issue, however they come up short in a number of areas. Here is one that I made a while back - it has it's drawbacks and an in engine solution would be much more elegant. Additional drawbacks of the current handmade approach arise when you have agents of different sizes. Maps that would work for a small enemy no longer work for a medium to large sized one. As far as proc gen, you might consider making larger chunks/rooms by hand and then using proc gen to decide how to connect those rooms together. Though I do agree, that this feature could potentially pair nicely with proc gen. How my plugin works (pre 3.5) - for reference:
I'm sure there are probably faster or more efficient methods and I would love to discuss them. Edit - Agent size related issue: |
Beta Was this translation helpful? Give feedback.
-
@smix8 since the new 2D navigation system is using the underlying 3D system, would it be possible to use the existing 3D system to bake 2D collision shapes? |
Beta Was this translation helpful? Give feedback.
-
Working on 2D NavigationMesh Baking, progress see video below. |
Beta Was this translation helpful? Give feedback.
-
Added parser to bake a NavigationRegion2D NavigationPolygon from TileMap / TileSet. Works the same as NavigationRegion3D works with GridMap. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the Godot 4.0 alpha
here I had to make these polys by hand, and leaving space around the edges/corners so the bot (blue object) doesn't get stuck on its way to the goal (green object). There is a NavigationObstacle2D (red object) in the way.
bot is a CharacterBody2D + NavigationAgent2D
I'm thinking, it would be impossible to use this nav system with procedurally generated rooms / environments, because there is no auto-generation for navpolys
Beta Was this translation helpful? Give feedback.
All reactions