A* Pathfinding Project

Pre-Purchase Questions (Avoidance)


#1

Im interested in acquiring this asset, however I just wanted to confirm that it can do what I can’t seem to achieve with Unity’s own navigation system.

Examples of what I’m shooting for:
https://youtu.be/ECetTlIXLSk?t=54 (Ranged)
https://youtu.be/95argVtj50U?t=66 (Melee)

I’m creating a very basic battle simulator for mobile, so I’ll have many units clashing heads and ideally surrounding eachother nicely from short or long ranges. When I tried to implement this via Unity Navmesh, I was getting a lot of units pushing eachother to get to their target. I Tried to solve this via changing the avoidance properties, which caused units to just clump behind higher priority units and not find a new path to the target (Not forming concaves if they are long range). I then tried using NavMeshObstacles, toggling NavAgents off and NavMeshObstacles on, but this failed too. Carving the mesh with the NavMeshObstacles came close to working but then having an unit try to target a carving unit messed up their pathfinding (Particularly in close range, long range was fine). Finally I tried solving this problem creating a NavMeshSurface for each of my types of agents and then substituting NavMeshObstacle with NavMeshModifierVolumes on agents then regenerating the mesh when a unit reached its target which was the closest to the behaviour that I wanted, however it was very bad for performance and jenky AF.

I was just wondering if I can achieve the behaviour I want as seen in the links provided and how difficult it would be to achieve with this Asset. I’m not in the best position to fork out $100 for an asset, so If I could achieve this with Unity’s NavMesh system that would be great but it’s not looking promising.

Thanks in advance!


#2

Hi

The current beta has an example scene called RTS which has support some this kind of behaviour.
I cannot claim it is as good as SC2 (they had a big team and many years to polish that behaviour), but it works relatively well.

You can see an example of it in this video


#3

Hi Aron, it looks fantastic! I don’t suppose you could send me a video with the range of the units being 0 (melee range) could you? This is where things start to break down for me with Unity Nav.

I definitely don’t expect the pathfinding to be as good as starcraft 2 since like you said they had a big team for that. I just need something better than Unity nav XD

Even something on the level of clash royale would satisfy me.


#4

Hi @aron_granberg I understand you must be incredibly busy, I am still interested in the asset, I just wanted to get an idea of the melee to melee / melee to ranged behavior.


#5

Hi

I tried to record something. Unfortunately my screen recording program doesn’t seem to work so well. I think wayland (on linux) has some problems with screen recording at the moment :/. It just saved a black file.

In any case. It does work kinda. But primarily the thing that goes wrong especially in melee is that the units do not agree on which side to surround from. Some units want to go left and some right, and they end up running into each other and getting stuck trying to pass through each other. This is something I have been aiming to fix before the rts beta is released though. But it turned out to be trickier than I thought.

If one disables locking the position of the agents when they attack it does work a bit better for melee (it’s more similar to clash royale where the units push each other a lot), but not completely satisfactory I would say.