Pathfinding in an OpenWorld

Heyho,
I created an Script which apply a Grid and this one moves with the player ( Its a Fps player) If the NPC are in a range of 200 they get activated. Now the problem is that the npc cant move and a unwalkable node is under the feets of it.
Why is this and how I can rescan it so it is walkable again?

Hi

It sounds like you want to check out the example scene called ‘Procedural’.

I´ve done I know use the script which was included in this scene to move the grid.

But know I got this error:
Path Failed : Computation Time 0.00 ms Searched Nodes 0
Error:
Path Number 45 (unique id)
UnityEngine.Debug:Log(Object)
AstarPath:LogPathResults(Path) (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:860)
c__Iterator9:MoveNext() (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:2743)
AstarPath:Update() (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:907)

The Ai moves a bit but kind of crazy and give this error out.

Hi

Make sure that the layer which the NPC is in is not included in the collision testing or height testing layer masks in the grid graph settings.

Well I just go through my Code and I saw the problem was I gave him each second a new Target which was a result of the rewrite of the AI Control System. So its resolved :stuck_out_tongue:

Thanks for the fast responses :slight_smile:

1 Like