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 a method to get all points from an AStarGrid2D #6276
Comments
Shouldn't the Visible Navigation debug menu option have a way to display AStar points (in both 2D and 3D)? This could be toggled separately on the AStar node if needed, similar to how you can already toggle this on TileMap. |
@Calinou AStar2D and AStarGrid2D are not Nodes and do not interact with the Scene Tree. How and where would the points be displayed? |
not sure if that is possible, but even if, it would be useful to have access to the underlying arrays, or atleast a copy of it. |
Describe the project you are working on
turn based rpg game
Describe the problem or limitation you are having in your project
im trying to debug and visualize what astargrid2d is doing, but i dont have a way to access all the points at once.
i realize i could just use the size + offset variables, but it would be better if we can get the underlying stored data.
PS: a get closest point function would also be very useful.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
it would be really helpful, if there was a get_all_points() function, to write debug code and visually see what the AstarGrid2D is doing
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
a new function added to the AstarGrid2D class, that returns an array of all points, something like, get_all_points() -> Array:
If this enhancement will not be used often, can it be worked around with a few lines of script?
i think its an important addition to the AstarGrid2D class
Is there a reason why this should be core and not an add-on in the asset library?
the AstarGrid2D class is already part of core
Bugsquad edit (keywords for easier searching): AStar
The text was updated successfully, but these errors were encountered: