Godot Version
v4.3.stable.official [77dcf97d8]
Question
Can Godot’s implementation of the A* (AStar) pathfinding algorithm for 2D space, the classes AStar2D
or AStarGrid2D
, handle pathfinding for objects greater than one point in size?
Details
I’m making a game with a tile-based map using a set of TileMapLayer
nodes, and I used AStarGrid2D
to handle navigation atop it.
It’s easy enough to setup navigation with that class for objects that only occupy one point (or 1 × 1 tiles). How would I go about setting-up navigation for objects greater than that in size, but still square-shaped?
I’ve read some forum posts, but most of those posts suggest making a tile layer map with its own instance of the A* algorithm for every possible object size, but that doesn’t seem practical.