mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
* navigation_astar: replace deprecated TileMap with TileMapLayer * navigation_astar: use get_used_cells() instead of iterating over region This also removes the confusing use of Tile.OBSTACLE. The tile enum is mostly used for atlas coordinates but in this case it is compared with the source id which only happens to be zero as well. * navigation_astar: use constants for atlas coordinates This makes it more obvious how to set cells in larger tilesets where the second position is not zero. It also removes the constant OBSTACLE which is unused since the last commit. * navigation_astar: mention get_used_rect() Using it in this example is more complex (as the border has no cells) but it's good to know.
Grid-based Navigation with AStarGrid2D
This is an example of using AStarGrid2D for navigation in 2D, complete with Steering Behaviors in order to smooth the movement out.
Language: GDScript
Renderer: Compatibility
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2723
