Hi, I am using "AstarPath.active.GetNearest(point, nn);" a lot on agents to see if a sampled position is on the graph. From what I understand is that this is the equivalent to NavMesh.SamplePosition. However in my project the astar way is very slow. Right now it is what takes most of my frame time. The old NavMesh way was not even close as slow.
I should point out that I´m doing quite a lot of GetNearest checks. Maybe 30 per agent every second or so with 20-30 agents in the scene. Since this worked without problems with the NavMesh.SamplePosition i figured it should work with Astar also.
Am I doing something wrong here or is this the expected performance, maybe there is a way to check if a point is walkable cheaper than this?
Any help is appreciated
Edit: Im using a Navmesh, exported from Recast