Commit Graph

30 Commits

Author SHA1 Message Date
6a288c9275 Corrected the order of DiagonalMode in Add Property 2025-08-01 14:59:59 -07:00
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
3b1a481f13 Merge pull request #97843 from detomon/optimize-a-star-grid-2d-solve
Reduce allocations when solving path in `AStarGrid2D`
2025-03-30 09:06:02 -05:00
10f6c01b9c Remove ABS in favor of Math::abs 2025-03-19 13:52:40 +01:00
eaea7c1065 Reduce allocations when solving path in AStarGrid2D 2024-10-05 12:17:50 +02:00
c46b5af06b fix astar partial path destination can be solid/disabled
* AStar2D, AStar3D and AStarGrid2D will now return a path when allow_partial_path is true even if the destination is a solid/disabled point.

# Conflicts:
#	core/math/a_star_grid_2d.cpp
#	core/math/a_star_grid_2d.h
2024-09-12 20:09:41 -07:00
202e197717 Improve AStarGrid2D performance when jumping is enabled 2024-09-05 18:12:43 +02:00
1e6b6eaf49 Merge pull request #92123 from timothyqiu/estimate-end
Change param name of AStar's `_estimate_cost` method
2024-08-28 00:10:47 +02:00
9c7cf5440c Merge pull request #91868 from Chaosus/astargrid_get_point_positions_in_region
Add a method to retrieve all points within a region to `AStarGrid2D`
2024-08-28 00:10:42 +02:00
453c8753a9 Add a check to prevent user to call AStarGrid2D::update when its not needed 2024-07-06 14:59:38 +03:00
ed61d41697 Change param name of AStar's _estimate_cost method 2024-05-19 22:08:36 +08:00
db2e09e9cd Add a method to retrieve all points within a region to AStarGrid2D 2024-05-12 18:14:13 +03:00
aa1bbe1542 add partial path return option for astar
* AStar2D, AStar3D and AStarGrid2D now can return a partial path if the destination point isn't reachable but still in the map. This option is available for both get_point_path and get_id_path
2024-04-03 22:27:33 -07:00
04bb89c0bd Add isometric cell shape mode to AStarGrid2D. 2023-10-03 21:04:03 +03:00
a8ff5f086d Fix typo in heuristic_euclidian helper in AStarGrid2D 2023-09-25 14:33:22 +03:00
1621110e2d Core: Some code style improvements to AStarGrid2D 2023-09-19 17:20:38 +03:00
5f56aa88f8 Add the fill region methods to the AStarGrid2D 2023-07-15 16:52:29 +03:00
76ee3d4f31 Allow negative coordinates in AStarGrid2D 2023-04-26 09:29:33 +03:00
cc0a243ce0 Enchance the performance of AStar by using a LocalVector(2) 2023-01-27 16:28:11 +03:00
5b1df48c6c Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
6640eb8065 Fix error in AstarGrid2D::get_id_path 2023-01-08 10:34:33 +03:00
4a45c76737 Fix jumping in AStarGrid2D when DIAGONAL_MODE_NEVER is enabled 2023-01-06 13:40:24 +03:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
16efd0b0fc Divide AStarGrid2D::default_heuristic into two different heuristics 2022-12-24 09:31:02 +03:00
0bcbf8e00d Add get_point_position method to AStarGrid2D 2022-12-20 23:21:38 +03:00
8c478dcec9 Restore weight scale for AStarGrid2D (partially) 2022-12-20 12:22:32 +03:00
bf19a1d3b3 refactor(AStarGrid2D): Return Vector2i in get_id_path
Signed-off-by: MisterMX <mbxd12@web.de>
2022-09-30 12:02:28 +02:00
533e3669e7 Fix incorrect heuristic order in AStarGrid2D 2022-09-12 13:16:46 +03:00
b7e2d45233 Replace Vector2(i) with Size2(i) for methods returning a size 2022-09-01 20:04:17 +02:00
4d7c1b92e9 Implement AStarGrid2D class with jump-point pathfinding 2022-08-30 17:29:23 +03:00