Paths for irregular shaped footprint objects?

image

I have a bunch of irregular multi-block items that I need to move around the grid environment. Some of these objects are rectangular, but some are not, and are made of multiple boxes. They can not be rotated.

For example, none of the shapes can reach tile D, and only the orange shape can reach tile C.

How could I find the path for one of these blocks?

Hi

You can take a look at the bottom of this page https://arongranberg.com/astar/docs/multipleagenttypes.html which has an approach that uses an ITraveralProvider to do a similar thing. It uses a square, but it can easily be modified to be any shape (as long as it cannot be rotated).

Oh, ITraversalProvider looks like it’s precisely what I need. I’ll look into it. Thanks Aron!!

1 Like