A* Pathfinding Project

A* is throwing error after following documentation


#1

When using the RichAI component or the template from the “Getting started with A*” it throws this error:

Path Failed : Computation Time 0.00 ms Searched Nodes 0
Error: 
Path Number 1 (unique id)
UnityEngine.Debug:Log(Object)
AstarPath:LogPathResults(Path) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:763)
AstarPath:<InitializePathProcessor>m__2(Path) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:1169)
Pathfinding.<CalculatePaths>c__Iterator0:MoveNext() (at Assets/AstarPathfindingProject/Core/Misc/PathProcessor.cs:571)
Pathfinding.PathProcessor:TickNonMultithreaded() (at Assets/AstarPathfindingProject/Core/Misc/PathProcessor.cs:180)
AstarPath:Update() (at Assets/AstarPathfindingProject/Core/AstarPath.cs:791)

What gives? I had it working a few months ago but now it doesn’t and I am sure I am doing everything correctly.


#2

I apologize for the bump however this is a real pressing issue.
I googled and it appears this error came up a few weeks ago on this forum to which the developer said he’d fixed it in the next update.


#3

Hi

Due to a regression in 4.0 the actual error is not included in that message, but it should have been logged in a separate message.
From experience, the most common cause of that error is that your character has been included in the ‘height testing’ layer mask, so a node has been generated on top of the character’s head. When it searches for a path it will not be able to find any other nodes because they will not have been connected to the node on the character’s head.


#4

Thanks for responding so quickly;
I added the unit to the collision mask at first but removed it when this error came up. I don’t have the height map for the unit on the same height mask that is being called in A* (The unit is on Default, the ground is on ground). I even re-downloaded the A* project files from the asset store and set everything up again and it still shows the error.


#5

You could try following the video tutorial instead: https://youtu.be/OpgUcYzRpwM
It’s pretty new so it is not mentioned in the docs yet.


#6

So after watching the video I found my mistake.
Embarrassingly, I forgot to add the terrain to the ground layer. It works now.
Thanks for the help and sorry for the bother.

I was just so tired when this issue risen that I must’ve overlooked the first steps.

Thanks again.


#7

Great that you got it working :slight_smile: