I notice that the free version does not include local avoidance amongst agents. To me this seems like a requirement for RTS pathfinding. Is it ok to do RTS without it. Without local avoidance, what happens when a pack of units collides head on with another pack of units? Will they still make adjustments and find their way through, but in a less graceful sort of way?
Hi
No, they will not make any adjustments to their paths.
Usually it is ok if you just make sure to not order units to move to the exact same point but instead randomize their target positions slightly (or place the target positions in a circle or something similar).
I guess I should just try it out and see, which I will do when I get home. But what exactly will they do? If two packs of say 50 agents are send on direct collision course? Do they just clip through each other? Or do they eventually just stop dead? Or some sort of freak out dance?
EDIT:
Related question.
Does A* pathfinding project handle dynamically adding new obstacles at runtime.? This is obviously a prerequisite for RTS pathfinding, as static buildings are commonly placed. I believe I read an FAQ that say its support grid based pathfinding in addition to navmesh. And apparently grid based is good for rts and adding new obstatcles?? I also understand that navmesh cutting is a pending feature. Is navmesh with cutting more desirable for RTS pathing, than a grid based pathing? What is the current state of navmesh cutting in A* project. Will it be in free or pro?
They will just clip through each other (well, actually that depends on what you are using to control them, if you are using CharacterControllers it is likely that the physics system will prevent them from intersecting and then they will just stop/try to move through each other but not really succeeding).
Yes, obstacles can be added at runtime.
Navmesh cutting is not a pending feature, it is implemented in the pro version. Is there some part of the documentation that I have forgot to update?
I would recommend grid based pathfinding for your RTS (at least if the buildings only have fixed rotations or increments of e.g 90 degrees), grid are usually much easier to work with.
Thank you for the response!
I have another RTS pathfinding related question.
I am working with a grid based node system. I notice that when I issue a move, the object takes a very stepped / jagged movement instead of a straight line. In the docs it sasy that grid is good for RTS style game. This type of movement is not adequate though for an RTS. Should I be using navmesh.
With the A* pathfinding project, does it just return the path for you, and leave navigating that path up to you code? As opposed to the Unity pathfinding, where the locomotion is also handled by the NavMeshAgent.?
Hi
You can attach the Funnel Modifier to your character, that will smooth out the path.
Alternatively you can try the Raycast Modifier or the Simple Smooth Modifier.
Each of those have different approaches for simplifying or smoothing out the path.
The funnel modifier should usually be used by itself, but the raycast modifier and the simple smooth modifier can be used together.
Thanks for all your responses Aron! It is greatly appreciated. I have most certainly bit off more than I can chew for my first game development project. But I have been an RTS fan my whole life, so I am hoping that can sustain my perseverance.
I will try grid pathfinding with different modifiers when I get home tonight. I have noticed without local avoidance, that the objects quite often still manage to make it around each other.
Is it a possibility to mark node occupied aka impassable while a unit occupies it, and vacant when it leaves there. So units will navigate around blobs?
Would you say that my best solution for an RTS would be grid graph, with RVO local avoidance algorithm?