I’ve scoured this forum and tried a few examples but to no avail. So going to defer to the experts here.
We are using your api for a hybrid RTS military style game. The game pieces move on a grid using the simplest A* methods. We aren’t doing anything fancy - your api has been fantastic for this using the most basic setup. Our grid board selection tiles match the AI grid size exactly so the path nodes fall center of each tile. Obstacles such as houses and bushes are marked unwalkable; however there are a couple game pieces that can occupy houses and vehicles such as infantry. Occupying vehicles isn’t a problem since they’re on the AI grid, but houses are off the AI grid.
How it works is when the player moves infantry into a house I get the nearest tile to the house to set the path then OnDestinationReached() I want to disable the AI temporarily and position the infantry at the center of the house (off grid) then when the player is ready to leave the house re-enable the ai so the infantry can move to a nearby tile. All this works to some extent but the infantry never take the house position even after I disable seeking and canmove in the AIPath script. They are clamped to the last node in the path.
So my question is how can I temporarily disable the aiPath for this game piece so that the infantry items can “occupy” the center of the house off grid. I also tried disabling the aiPath script altogether and it still won’t move the piece.
I know that I could set the houses as walkable with a high value, but I don’t want to rework my grid setup because doing that would have other consequences I don’t want to deal with right now.
Thanks in advance.
We have some early test demo vids on YT - you can get a sense of the game. Particularly at mark 32 where the infantry is being moved around and occupies a vehicle.