Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AstarGrid2D headline to 2D Navigation Overview #10135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tutorials/navigation/navigation_introduction_2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Godot provides the following objects and classes for 2D navigation:

The AStar2D class is best suited for cell-based 2D gameplay that does not require actors to reach any possible position within an area but only predefined, distinct positions.

- :ref:`AstarGrid2D<class_AstarGrid2D>`
``AstarGrid2D`` objects provide an option to find the shortest path between two points on a partial 2D grid.

The AStarGrid2D class is best suited for cell-based 2D gameplay that only require actors to move between distinct positions on a grid.
AStarGrid2D is better used over AStar2D when applicable as it only requires the region of the grid to be set, rather than manually creating and connecting individual points.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, hello and welcome 👋 Well spotted, adding this is useful!

I found the long description in the class reference easier to parse and understand the pros/cons:

AStarGrid2D is a variant of AStar2D that is specialized for partial 2D grids. It is simpler to use because it doesn't require you to manually create points and connect them together. This class also supports multiple types of heuristics, modes for diagonal movement, and a jumping mode to speed up calculation


- :ref:`NavigationServer2D<class_NavigationServer2D>`
``NavigationServer2D`` provides a powerful server API to find the shortest path between two positions on an area defined by a navigation mesh.

Expand Down