I’m trying to make a 2D turn based game, where I want the enemies to avoid eachother, but obviously not themselves.
Looking at the documentation, this page is pretty much exactly what I’m after (I think): https://arongranberg.com/astar/docs/turnbased.html
Unfortunately, the page feels a little incomplete, or maybe it’s just because I don’t have the pro-examples.
So, a couple of questions:
- The example calls
Start(), does this keep track of the objects position, or should I call it again, every time the object (enemy) has moved?
- From what I gather, the
BlockManager.TraversalProvideris what I need to then make the enemies do the avoid. It takes in a
List<SingleNodeBlocker>as obstacles. In the example, this is just a public property, how does this get populated? Is that something I need to do myself?
I feel like some points are missing in that article. Like it’s an incomplete example. This could, of course, just be due to my lack of knowledge on this package.
Am I missing something else? Any real examples I can check out, anywhere?