AStar3D example code for _compute_cost() and _estimate_cost() nonsensical #10230
Labels
area:class reference
Issues and PRs about the class reference, which should be addressed on the Godot engine repository
bug
content:example code
Issues and PRs involving code examples
Your Godot version:
4.3 and Latest
Issue description:
The example code in the doc for AStar3D for _compute_cost(u,v) and _estimate_cost(u,v) makes no sense in both GDScript and C#. Unless I'm mistaken, u and v are point ids not point vectors, so these examples compute a value based on subtracting ids which is meaningless.
It should be something more like get_point_position(u).distance_to(get_point_position(v)) for points in euclidean space.
If the intent was really to compute/estimate a cost based on point ids, can someone explain in what situation these examples make any sense?
URL to the documentation page:
https://docs.godotengine.org/en/latest/classes/class_astar3d.html
https://docs.godotengine.org/en/stable/classes/class_astar3d.html
The text was updated successfully, but these errors were encountered: