A* Pathfinding Project

Unit occupies multiple nodes


#1

Hi,
I am building a turn based game using a grid graph. I got multiple unit types, and one is a tank. The tank occupies multiple nodes, so I need to construct a path, which needs to take into account its special size (the path needs to be at least 3 nodes broad).

Any idea how to do this?

Thanks, and Best


#2

Hi

This page lists two approaches you can use: https://arongranberg.com/astar/docs/multipleagenttypes.html


#3

Thank you! Works like a charm.