Support Forum

Cant get Wander method #3 to work

Hi!

I have this recast graph on a plane Im using a RichAI and a Seeker on the character.
Captura.PNG

Then im using this pieceof code

image

Which in result returns 100 points inside 1 single node. It only returns points inside the node my character is in.
When i replace the AstarPath.StartPath(path); line with seeker.StartPath(path), i get the following exception tho

ArgumentException: Path traverses no nodes
Pathfinding.RichPath.Initialize (Pathfinding.Seeker seeker, Pathfinding.Path path, System.Boolean mergePartEndpoints, System.Boolean simplificationMode) (at Assets/AstarPathfindingProject/Core/AI/RichPath.cs:47)

What am i doing wrong? It doesnt matter what radius i apply its always the same result.

Thanks :slight_smile:

Hi

The ConstantPath takes a path cost value, not a world-space distance. Cost values for paths are approximately 1000 times the world-space distance. So if you just multiply rand by 1000 it should work relatively well I think.

Thank you Aron it worked :slight_smile: