Closed
Description
Godot version:
3.2
OS/device including version:
Windows 10 Pro 1909
Issue description:
When you try to iterate with the get_available_point_id method of the AStar class you get an index order of [1, 0, 2, 3, 4 ...] since the method returns 1 if empty.
Steps to reproduce:
- Make a Project with a Scene with a TileMap and create an 8x8 grid for example.
- Attach following script to it:
func _ready() -> void:
var astar = AStar2D.new()
var cells = get_used_cells()
for cell in cells:
astar.add_point(astar.get_available_point_id(), cell)
print(astar.get_points())
- Output:
[1, 0, 2, 3, 4, 5, ...]
Minimal reproduction project:
See 2.
Activity