- A* version: Latest
- Unity version: 2022.3.48f1
Hi there!
I’ve been using this A* implementation for awhile and I’m really not sure what the best implementation for my game would be.
The problem(s):
- Enemies should push and shove their way through a choke point if there is one.
- All the enemies are attacking a wall. A hole appears in the wall. I want them to swarm through the wall.
- Enemies should push and shove their way to their target destination if other enemies are in the way.
- An example would be six archers spawn. They see a house that is 12 units away and they can shoot 5 so they all set their target position as 5 units away from the house.. The first archer gets there and the rest kind of just line up behind the first one.
Any thoughts on this? Is this even a path finding problem or is this something I should think through using Unity systems and my own implementations?
Hi
This sounds doable using local avoidance and by tweaking the priorities and avoidance layers in a clever way.
For example, you could make your archers get a very low local avoidance priority (or even make other units ignore them completely), to allow them to easily push them aside.
Local avoidance was a good choice. Things are behaving much better now using your AIPath component with RVOController and Seeker. None of the units overlap and they do funnel through like they should.
However, how do I get melee units to push through the ranged units? I’m not quite sure what you’re suggesting.
That’s this part:
To break it down a little bit, all RVOAgent (or FollowerEntity RVO settings, since it’s already baked into them) have a priority. You can give your ranged units a low priority and your melee units a large priority. Melee units will push through ranged units and ranged units will move away from melee units when close.