Wander with AIPath

mdookie4

New member
Hi Justin,

I have being trying to calibrate the Wander task fields with AIPath script (integration with A* pathfinding), and I noticed that the waypoint Wander task set for the object does not care about the grid graph generated via A*. Areas that are supposed to be not passable (no connections), the Wander task will set a waypoint in those areas, resulting in the object trying to reach that waypoint, yet it is not able to traverse to that area. And if the Arrive Distance set in Wander task is not high enough, the object will just stop at the edge of the area, seemingly trying to walk towards the waypoint yet unable to do so.

May I know is there some modification we should work on the Wander script for it to work with A* grid graph?

Appreciate your advice, thank you,

Vincent
 

mdookie4

New member
Is it a case of the wander script dependent on the type of graph? Will it be better if I change the graph type from grid to navmesh instead or there is still a need to call the sample position API in a script before running the wander task script?
Thank you,

EDIT: I got a reply mentioning about this function AstarPath.active.GetNearest(POS).node, so do I have to add this function inside Wander script or add a specific task before the Wander script in BE editor?
 
Last edited:
Top